mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-25 02:22:14 +00:00
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:
parent
13d45de376
commit
2963b852db
29
.github/workflows/main.yml
vendored
29
.github/workflows/main.yml
vendored
@ -53,6 +53,7 @@ jobs:
|
||||
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||
- run: npm run test:node -- --cov --bail
|
||||
- uses: codecov/codecov-action@v1
|
||||
|
||||
test-chrome:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
@ -63,6 +64,7 @@ jobs:
|
||||
node-version: lts/*
|
||||
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||
- run: npm run test:browser -- -t browser -t webworker --bail
|
||||
|
||||
test-firefox:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
@ -73,6 +75,7 @@ jobs:
|
||||
node-version: lts/*
|
||||
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||
- run: npm run test:browser -- -t browser -t webworker --bail -- --browser firefox
|
||||
|
||||
test-ts:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
@ -83,6 +86,7 @@ jobs:
|
||||
node-version: lts/*
|
||||
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||
- run: npm run test:ts
|
||||
|
||||
test-interop:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
@ -93,3 +97,28 @@ jobs:
|
||||
node-version: lts/*
|
||||
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||
- 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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user