Skip to content

Commit e8c2065

Browse files
committed
update publish workflow
1 parent 6fa098c commit e8c2065

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,29 @@ name: Publish Package to npmjs
33
on:
44
release:
55
types: [published]
6-
workflow_dispatch:
76

87
jobs:
98
publish:
109
runs-on: ubuntu-latest
10+
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- uses: actions/setup-node@v4
1515
with:
1616
node-version-file: ".nvmrc"
1717
- name: Download artifact
18-
uses: actions/download-artifact@v2
19-
with:
20-
name: libxmlwasm.tgz
21-
path: libxmlwasm.tgz
18+
run: |
19+
$runid=$(gh run list -w build.yml -s success -c $GITHUB_SHA --json databaseId -q ".[0].databaseId")
20+
gh run download $runid -n libxmlwasm.tgz
21+
- name: Unpack artifact
22+
run: |
23+
tar axf libxmlwasm.tgz
24+
mv package/dist .
25+
rm -rf package libxmlwasm.tgz
2226
- run: ls . */
27+
28+
- name: Publish to npm
29+
run: corepack yarn npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)