This repository was archived by the owner on Dec 22, 2024. It is now read-only.
File tree 4 files changed +1840
-29
lines changed
4 files changed +1840
-29
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous deployment to package registries
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*
7
+
8
+ jobs :
9
+ build-and-deploy :
10
+ name : Build and deploy NPM package
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout repo
14
+ uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : ' 0'
17
+
18
+ - name : Setup pnpm
19
+ uses : pnpm/action-setup@v2
20
+
21
+ - name : Configure node for NPM registry as registry
22
+ uses : actions/setup-node@v4
23
+ with :
24
+ node-version : ' 20.x'
25
+ cache : " pnpm"
26
+ registry-url : ' https://registry.npmjs.org'
27
+ scope : ' @openscript-ch'
28
+
29
+ - name : Install dependencies
30
+ run : pnpm install --frozen-lockfile
31
+
32
+ - name : Create Github release
33
+ run : pnpm release:create-github-release
34
+ env :
35
+ CONVENTIONAL_GITHUB_RELEASER_TOKEN : ${{secrets.GITHUB_TOKEN}}
36
+
37
+ - run : pnpm publish --access public --no-git-checks
38
+ env :
39
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
40
+
41
+ - name : Configure node for Github registry as registry
42
+ uses : actions/setup-node@v4
43
+ with :
44
+ node-version : ' 20.x'
45
+ registry-url : ' https://npm.pkg.github.com'
46
+ scope : ' @openscript-ch'
47
+
48
+ - name : Authenticate with the GitHub Package Registry
49
+ run :
50
+ echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
51
+
52
+ - name : Publish package on Github NPM registry
53
+ run : pnpm publish --no-git-checks
54
+ env :
55
+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11
11
],
12
12
"scripts" : {
13
13
"build" : " tsc" ,
14
- "test" : " echo \" Error: no test specified\" && exit 1"
14
+ "test" : " echo \" Error: no test specified\" && exit 1" ,
15
+ "release:major" : " standard-version --release-as major && git push --follow-tags" ,
16
+ "release:minor" : " standard-version --release-as minor && git push --follow-tags" ,
17
+ "release:patch" : " standard-version --release-as patch && git push --follow-tags" ,
18
+ "release:create-github-release" : " conventional-github-releaser -p angular"
15
19
},
16
20
"keywords" : [],
17
21
"author" : " openscript Ltd. <hi@openscript.ch>" ,
18
22
"license" : " MIT" ,
19
23
"dependencies" : {
20
24
"@automerge/automerge-repo" : " ^1.0.19" ,
25
+ "conventional-github-releaser" : " ^3.1.5" ,
26
+ "standard-version" : " ^9.5.0" ,
21
27
"typescript" : " ^5.3.3"
22
28
},
23
29
"publishConfig" : {
You can’t perform that action at this time.
0 commit comments