File tree 1 file changed +58
-0
lines changed
1 file changed +58
-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
+ permissions :
13
+ contents : write
14
+ steps :
15
+ - name : Checkout the repository
16
+ uses : actions/checkout@v3
17
+ with :
18
+ fetch-depth : 0
19
+
20
+ - name : Install GitVersion
21
+ uses : gittools/actions/gitversion/setup@v0
22
+ with :
23
+ versionSpec : 5.x
24
+
25
+ - name : Calculate the build version
26
+ id : gitversion
27
+ uses : gittools/actions/gitversion/execute@v0
28
+ with :
29
+ useConfigFile : true
30
+
31
+ - name : Install and configure Node.js
32
+ uses : actions/setup-node@v4
33
+ with :
34
+ node-version : 18
35
+ registry-url : ' https://registry.npmjs.org'
36
+
37
+ - name : Install pnpm
38
+ uses : pnpm/action-setup@v3
39
+ with :
40
+ version : 8
41
+ run_install : true
42
+
43
+ - name : Increment package version
44
+ run :
45
+ - git config --global user.email "github-actions[bot]@users.noreply.github.com"
46
+ - git config --global user.name "github-actions[bot]"
47
+ - " npm version ${{ steps.gitversion.outputs.semver }} -m 'chore: Bump package version'"
48
+
49
+ - name : Build
50
+ run : pnpm build
51
+
52
+ - name : Package
53
+ run : pnpm package
54
+
55
+ - name : Publish
56
+ run : npm publish --dry-run --provenance --access public
57
+ env :
58
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments