File tree Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ push : { tags: "v[0-9]+.[0-9]+.[0-9]+*" }
4
+
5
+ permissions : {}
6
+ jobs :
7
+ github :
8
+ permissions : { contents: write }
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
12
+ with : { egress-policy: audit }
13
+ - uses : actions/checkout@v4
14
+ # TODO exit this job differently than success if release already exists
15
+ - name : gh release create
16
+ run : |
17
+ # shellcheck disable=SC2086
18
+ gh release view $tag || \
19
+ gh release create ${tag/*-*/"$tag" --prerelease} --generate-notes
20
+ env :
21
+ GH_TOKEN : ${{ github.token }}
22
+ tag : ${{ github.ref_name }}
23
+
24
+ npm :
25
+ permissions : { id-token: write }
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
29
+ with : { egress-policy: audit }
30
+ - uses : actions/checkout@v4
31
+ - uses : actions/setup-node@v4
32
+ with :
33
+ registry-url : https://registry.npmjs.org
34
+ - run : npm ci
35
+ - run : npm publish --provenance
36
+ env :
37
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 7
7
"author" : " Zoltán Tömböl (https://github.com/ztombol)" ,
8
8
"contributors" : [
9
9
" Sam Stephenson <sstephenson@gmail.com> (http://sstephenson.us/)" ,
10
- " Jason Karns <jason.karns@gmail.com> (http://jason.karns.name )" ,
10
+ " Jason Karns <jason.karns@gmail.com> (http://jasonkarns.com )" ,
11
11
" Mislav Marohnić <mislav.marohnic@gmail.com> (http://mislav.net/)" ,
12
12
" Tim Pope (https://github.com/tpope)"
13
13
],
23
23
],
24
24
"scripts" : {
25
25
"test" : " bats ${CI+-t} test" ,
26
- "postversion" : " npm publish" ,
27
- "prepublishOnly" : " npm run publish:github" ,
28
- "publish:github" : " git push --follow-tags"
26
+ "postversion" : " git push --follow-tags"
29
27
},
30
28
"devDependencies" : {
31
29
"bats" : " ^1" ,
You can’t perform that action at this time.
0 commit comments