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 }}