File tree 1 file changed +53
-0
lines changed
1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Package Release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - github-action
7
+
8
+ jobs :
9
+ npm-package :
10
+ name : Build and push npm package
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout the repository
14
+ uses : actions/checkout@v3
15
+ with :
16
+ fetch-depth : 0
17
+
18
+ - name : Install GitVersion
19
+ uses : gittools/actions/gitversion/setup@v0
20
+ with :
21
+ versionSpec : 5.x
22
+
23
+ - name : Calculate the build version
24
+ id : gitversion
25
+ uses : gittools/actions/gitversion/execute@v0
26
+ with :
27
+ useConfigFile : true
28
+
29
+ - name : Install and configure Node.js
30
+ uses : actions/setup-node@v4
31
+ with :
32
+ node-version : 18
33
+ registry-url : ' https://registry.npmjs.org'
34
+
35
+ - name : Install pnpm
36
+ uses : pnpm/action-setup@v3
37
+ with :
38
+ version : 8
39
+ run_install : true
40
+
41
+ - name : Increment package version
42
+ run : " npm version ${{ steps.gitversion.outputs.semver }} -m 'chore: Bump package version'"
43
+
44
+ - name : Build
45
+ run : pnpm build
46
+
47
+ - name : Package
48
+ run : pnpm package
49
+
50
+ - name : Publish
51
+ run : npm publish --dry-run --provenance --access public
52
+ env :
53
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments