From 0910f66a7e25ce8f4549756fad269175fe7d47d5 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 7 Oct 2020 23:19:28 -0700 Subject: [PATCH] build: switch to release-please action (#260) --- .github/publish.yml | 2 -- .github/release-please.yml | 2 -- .github/workflows/ci.yaml | 1 + .github/workflows/release-please.yml | 31 ++++++++++++++++++++++++++++ 4 files changed, 32 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 e933b632..00000000 --- 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 3c065997..00000000 --- a/.github/release-please.yml +++ /dev/null @@ -1,2 +0,0 @@ -releaseType: node -handleGHRelease: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 969f7d40..e238e38a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,7 @@ on: branches: - master pull_request: + types: [ assigned, opened, synchronize, reopened, labeled ] name: ci jobs: test: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..d8052673 --- /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@v2.4.2 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: c8 + # 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 }}