chore: add automated releases (#1124)

Adds release-please github action to create gated releases and a release issue that tracks all issues that will be in a release.
This commit is contained in:
Alex Potsides 2022-01-20 13:19:38 +00:00 committed by GitHub
parent 13d45de376
commit 2963b852db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ jobs:
- uses: ipfs/aegir/actions/cache-node-modules@master - uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run test:node -- --cov --bail - run: npm run test:node -- --cov --bail
- uses: codecov/codecov-action@v1 - uses: codecov/codecov-action@v1
test-chrome: test-chrome:
needs: check needs: check
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -63,6 +64,7 @@ jobs:
node-version: lts/* node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master - uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run test:browser -- -t browser -t webworker --bail - run: npm run test:browser -- -t browser -t webworker --bail
test-firefox: test-firefox:
needs: check needs: check
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -73,6 +75,7 @@ jobs:
node-version: lts/* node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master - uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run test:browser -- -t browser -t webworker --bail -- --browser firefox - run: npm run test:browser -- -t browser -t webworker --bail -- --browser firefox
test-ts: test-ts:
needs: check needs: check
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -83,6 +86,7 @@ jobs:
node-version: lts/* node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master - uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run test:ts - run: npm run test:ts
test-interop: test-interop:
needs: check needs: check
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -93,3 +97,28 @@ jobs:
node-version: lts/* node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master - uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run test:interop -- --bail -- --exit - run: npm run test:interop -- --bail -- --exit
release:
runs-on: ubuntu-latest
needs: [test-node, test-chrome, test-firefox, test-ts, test-interop]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
bump-minor-pre-major: true
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- uses: bahmutov/npm-install@v1
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}