Skip to content

Commit d809bff

Browse files
committed
package release
1 parent 7848763 commit d809bff

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/publish-release.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ on:
66
- main
77

88
jobs:
9+
npmjs:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- run: npm install
23+
24+
- run: npm publish --provenance --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
928
github:
1029
runs-on: ubuntu-latest
1130
permissions:
@@ -22,6 +41,8 @@ jobs:
2241

2342
- run: npm install
2443

25-
- run: npm publish --provenance --access public
44+
- run: |
45+
sed -i 's+"name": ".*+"name": "@${{ github.repository }}",+gI' ./package.json
46+
npm publish --provenance --access public
2647
env:
2748
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)