Skip to content

Commit d663ae4

Browse files
committed
ci: use release please to manage releases
1 parent 2f1ca82 commit d663ae4

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,28 @@ on:
66
- master
77

88
jobs:
9-
build:
9+
release-please:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- uses: google-github-actions/release-please-action@v4
13+
id: release
14+
with:
15+
release-type: node
16+
# The logic below handles the npm publication:
1217
- uses: actions/checkout@v4
18+
# these if statements ensure that a publication only occurs when
19+
# a new release is created:
20+
if: ${{ steps.release.outputs.release_created }}
1321
- uses: actions/setup-node@v4
1422
with:
1523
node-version: '20.x'
1624
registry-url: 'https://registry.npmjs.org'
25+
if: ${{ steps.release.outputs.release_created }}
1726
- run: yarn install --frozen-lockfile
18-
- run: yarn test
19-
- run: yarn build
27+
if: ${{ steps.release.outputs.release_created }}
28+
- run: yarn test && yarn build
29+
if: ${{ steps.release.outputs.release_created }}
2030
- run: npm publish
2131
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)