Skip to content

Commit 05678df

Browse files
committed
ci: create auto publish action
1 parent 9b0a55c commit 05678df

File tree

2 files changed

+59
-33
lines changed

2 files changed

+59
-33
lines changed

.github/workflows/npm-publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Node.js Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build-and-publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 18
18+
registry-url: https://registry.npmjs.org/
19+
- uses: pnpm/action-setup@v3
20+
with:
21+
version: 8
22+
- run: pnpm i
23+
- run: pnpm build
24+
- run: pnpm publish --no-git-checks
25+
env:
26+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

pnpm-lock.yaml

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)