Skip to content

Commit 291577e

Browse files
committed
Add GitHub Actions workflow for package publishing
Introduces a workflow to publish the package to npm when a tag matching 'v*' is pushed. The workflow sets up Node.js, updates npm, installs dependencies, builds the project, and publishes to npm.
1 parent f7bfa3e commit 291577e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
# checkout@v5
17+
- uses: jonobr1/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
18+
# setup-node@v6
19+
- uses: jonobr1/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
20+
with:
21+
node-version: '20'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
# Ensure npm 11.5.1 or later is installed
25+
- name: Update npm
26+
run: npm install -g npm@latest
27+
- run: npm ci
28+
- run: npm run build --if-present
29+
# - run: npm test
30+
- run: npm publish

0 commit comments

Comments
 (0)