Skip to content

Commit 18f53d5

Browse files
author
Raul Melo
committed
add release to npm
1 parent 1c7938a commit 18f53d5

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v4
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
19+
- name: Set up Go
2220
uses: actions/setup-go@v4
2321
with:
2422
go-version: 1.21.7
@@ -29,6 +27,21 @@ jobs:
2927
distribution: goreleaser
3028
version: latest
3129
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- uses: actions/setup-node@v4
34+
name: Setup Node
35+
with:
36+
node-version: 20
37+
38+
- name: Generate NPM files
39+
run: |
40+
go run ./scripts/npm.go
3241
42+
- name: Publish to NPM
43+
run: |
44+
cd dist-npm
45+
npm publish
3346
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)