File tree Expand file tree Collapse file tree 8 files changed +2470
-6083
lines changed Expand file tree Collapse file tree 8 files changed +2470
-6083
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : ["release"]
6
+
7
+ jobs :
8
+ build-and-release :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v3
13
+
14
+ - name : Install pnpm
15
+ uses : pnpm/action-setup@v2.2.4
16
+
17
+ - name : Install deps
18
+ run : pnpm install
19
+
20
+ - name : Build lib
21
+ run : pnpm run build
22
+ - uses : actions/upload-artifact@v3
23
+ with :
24
+ name : build artifacts
25
+ path : dist/
26
+
27
+ - name : Set node version to 19.x
28
+ uses : actions/setup-node@v3
29
+ with :
30
+ node-version : " 19.x"
31
+ cache : " pnpm"
32
+ registry-url : " https://registry.npmjs.org"
33
+
34
+ - name : Publish to npmjs
35
+ run : npm publish
36
+ env :
37
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
38
+
39
+ - run : echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV
40
+
41
+ - name : Create release
42
+ uses : " marvinpinto/action-automatic-releases@latest"
43
+ with :
44
+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
45
+ automatic_release_tag : " v${{ fromJson(env.PACKAGE_JSON).version }}"
46
+ prerelease : false
47
+ title : " Release v${{ fromJson(env.PACKAGE_JSON).version }}"
You can’t perform that action at this time.
0 commit comments