Skip to content

Commit 232a558

Browse files
committed
ci: added workflow to integrate release-please
refs #1631 - this workflow integrates Google's `release-please-action`, which seems like the best option for using release-please and GHA - if a release was created, it'll also automatically publish to npm
1 parent 5e59e70 commit 232a558

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
id: release
12+
with:
13+
release-type: node
14+
package-name: mysql2
15+
changelog-path: 'Changelog.md'
16+
17+
- uses: actions/checkout@v3
18+
if: ${{ steps.release.outputs.release_created }}
19+
20+
- uses: actions/setup-node@v3
21+
if: ${{ steps.release.outputs.release_created }}
22+
with:
23+
node-version: 16
24+
registry-url: 'https://registry.npmjs.org'
25+
26+
- run: npm ci
27+
if: ${{ steps.release.outputs.release_created }}
28+
29+
- run: npm publish
30+
if: ${{ steps.release.outputs.release_created }}
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)