Skip to content

Commit affcd75

Browse files
committed
ci: add release-please workflow
1 parent 19b195b commit affcd75

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Release Please'
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: GoogleCloudPlatform/release-please-action@v2
11+
id: release
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
release-type: node
15+
package-name: test-release-please
16+
# The logic below handles the npm publication:
17+
- uses: actions/checkout@v2
18+
# these if statements ensure that a publication only occurs when
19+
# a new release is created:
20+
if: ${{ steps.release.outputs.release_created }}
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: 14
24+
registry-url: 'https://registry.npmjs.org'
25+
if: ${{ steps.release.outputs.release_created }}
26+
# if you are using Yarn, substitute the command below with `yarn install --frozen-lockfile`
27+
- run: npm ci
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)