Skip to content

Commit 4322437

Browse files
committed
ci: Add release-please script
1 parent fb5b63b commit 4322437

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches:
5+
- main
6+
name: release-please
7+
jobs:
8+
release-please:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: GoogleCloudPlatform/release-please-action@v3
12+
id: release
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
release-type: node
16+
package-name: absolute-version
17+
# The logic below handles the npm publication:
18+
- uses: actions/checkout@v3
19+
# these if statements ensure that a publication only occurs when
20+
# a new release is created:
21+
if: ${{ steps.release.outputs.release_created }}
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
registry-url: 'https://registry.npmjs.org'
26+
if: ${{ steps.release.outputs.release_created }}
27+
- run: ci/build-and-test.sh
28+
if: ${{ steps.release.outputs.release_created }}
29+
- run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
32+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)