Skip to content

Commit 35a88a4

Browse files
committed
feat(core): adds cicd via gh actions with publishing to npmjs.org
1 parent 7936777 commit 35a88a4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: googleapis/release-please-action@v4
18+
id: release
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
release-type: node
22+
package-name: create-mlpz-lambda
23+
24+
# The logic below handles the npm publication:
25+
- uses: actions/checkout@v4
26+
# These if statements ensure that a publication only occurs when
27+
# a new release is created:
28+
if: ${{ steps.release.outputs.release_created }}
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
registry-url: 'https://registry.npmjs.org'
34+
if: ${{ steps.release.outputs.release_created }}
35+
36+
- run: npm ci
37+
if: ${{ steps.release.outputs.release_created }}
38+
39+
- run: npm publish --provenance
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)