Skip to content

Commit 6c09c59

Browse files
committed
feat: gh action
1 parent 01105a5 commit 6c09c59

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

.github/workflows/ci-dev.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: DEV pipeline
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
8+
jobs:
9+
check:
10+
name: Source revision
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.11.1'
18+
19+
- run: npm ci
20+
- run: npm run format:check
21+
- run: npm run lint:check
22+
- run: npm run build

.github/workflows/ci-full.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check:
10+
name: Source revision
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.11.1'
18+
19+
- run: npm ci
20+
- run: npm run format:check
21+
- run: npm run lint:check
22+
- run: npm run build
23+
24+
tag:
25+
name: Version tag
26+
needs: [check]
27+
runs-on: ubuntu-latest
28+
outputs:
29+
status: ${{ steps.create_tag.outputs.successful }}
30+
version: ${{ steps.create_tag.outputs.version }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: jaywcjlove/create-tag-action@main
36+
id: create_tag
37+
with:
38+
package-path: ./package.json
39+
release: true
40+
41+
package:
42+
name: Build docker images
43+
needs: [check, tag]
44+
if: needs.tag.outputs.status == 'true'
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: '20.11.1'
51+
registry-url: 'https://registry.npmjs.org'
52+
- run: npm ci
53+
- run: npm build
54+
- run: npm publish
55+
env:
56+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)