Skip to content

Commit c443a11

Browse files
feat: 👷 create release pipeline
1 parent d273b7d commit c443a11

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: release-please
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
- name: Install dependencies
18+
run: npm install
19+
- name: Run tests
20+
run: npm run test
21+
22+
release-please:
23+
runs-on: ubuntu-latest
24+
needs: test
25+
steps:
26+
- uses: googleapis/release-please-action@v4
27+
id: release
28+
with:
29+
release-type: node
30+
31+
- uses: actions/checkout@v4
32+
if: ${{ steps.release.outputs.release_created }}
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
registry-url: https://registry.npmjs.org/
37+
scope: '@certible'
38+
if: ${{ steps.release.outputs.release_created }}
39+
- run: npm install
40+
if: ${{ steps.release.outputs.release_created }}
41+
- run: npm run build
42+
if: ${{ steps.release.outputs.release_created }}
43+
- run: npm publish
44+
env:
45+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
46+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)