Skip to content

Commit

Permalink
add release to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
raulfdm committed Feb 11, 2024
1 parent 1c7938a commit 18f53d5
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.7
Expand All @@ -29,6 +27,21 @@ jobs:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4
name: Setup Node
with:
node-version: 20

- name: Generate NPM files
run: |
go run ./scripts/npm.go
- name: Publish to NPM
run: |
cd dist-npm
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 18f53d5

Please sign in to comment.