Skip to content

Commit 4e75ab2

Browse files
committed
fix: update github workflow release
1 parent 76cfa17 commit 4e75ab2

2 files changed

Lines changed: 39 additions & 41 deletions

File tree

.github/workflows/publish.yml

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

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
id-token: write # Required for npm trusted publishing (OIDC)
12+
contents: read # Required for checking out the repository
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
registry-url: "https://registry.npmjs.org"
27+
28+
# npm 11.5.1+ required for trusted publishing
29+
- name: Update npm
30+
run: npm install -g npm@latest
31+
32+
- name: Install Dependencies
33+
run: npm ci
34+
35+
- name: Build
36+
run: npm run build:lib
37+
38+
- name: Publish to npm using Trusted Publisher
39+
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)