Skip to content

Commit aedd793

Browse files
committed
fix: update workflow to publish to npm
1 parent fca7b23 commit aedd793

File tree

2 files changed

+34
-36
lines changed

2 files changed

+34
-36
lines changed

.github/workflows/npm-publish-github-packages.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/npm-publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- run: npm ci
20+
# - run: npm test # No tests specified yet
21+
22+
publish-npm:
23+
needs: build
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
registry-url: https://registry.npmjs.org/
31+
- run: npm ci
32+
- run: npm publish
33+
env:
34+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)