From 366a498e8fd185bdb41c1689d603b25859627c0d Mon Sep 17 00:00:00 2001 From: "bencoe@google.com" Date: Fri, 31 Dec 2021 04:28:51 +0000 Subject: [PATCH] build: update publish configuration --- .github/publish.yml | 2 -- .github/release-please.yml | 2 -- .github/workflows/release-please.yml | 31 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) delete mode 100644 .github/publish.yml delete mode 100644 .github/release-please.yml create mode 100644 .github/workflows/release-please.yml diff --git a/.github/publish.yml b/.github/publish.yml deleted file mode 100644 index e933b632b..000000000 --- a/.github/publish.yml +++ /dev/null @@ -1,2 +0,0 @@ -project: oss-automation -secretId: node-tooling diff --git a/.github/release-please.yml b/.github/release-please.yml deleted file mode 100644 index 3c0659977..000000000 --- a/.github/release-please.yml +++ /dev/null @@ -1,2 +0,0 @@ -releaseType: node -handleGHRelease: true diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..585889f86 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,31 @@ +on: + push: + branches: + - master +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: standard-version + # The logic below handles the npm publication: + - uses: actions/checkout@v2 + # these if statements ensure that a publication only occurs when + # a new release is created: + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: 'https://external-dot-oss-automation.appspot.com' + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }}