Skip to content

Commit 7590164

Browse files
committed
ci: add publish workflow
1 parent 3b634e7 commit 7590164

File tree

2 files changed

+33
-15
lines changed

2 files changed

+33
-15
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88
branches:
99
- main
1010

11-
# permissions:
12-
# id-token: write
13-
1411
jobs:
1512
ci:
1613
runs-on: ubuntu-latest
@@ -28,15 +25,3 @@ jobs:
2825
- run: corepack enable
2926
- run: pnpm install
3027
- run: pnpm run lint
31-
- run: pnpm run build
32-
33-
- name: nightly release
34-
if: github.ref_name == 'main' &&
35-
!contains(github.event.head_commit.message, '[skip-release]') &&
36-
!startsWith(github.event.head_commit.message, 'docs')
37-
run: |
38-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
39-
pnpm changelogen --canary nightly --publish
40-
env:
41-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42-
NPM_CONFIG_PROVENANCE: false

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
ci:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
with:
18+
fetch-depth: 0
19+
20+
- run: npm i -fg corepack && corepack enable
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
cache: 'pnpm'
25+
26+
- run: corepack enable
27+
- run: pnpm install
28+
- run: pnpm run lint
29+
- run: pnpm run build
30+
- name: publish
31+
run: |
32+
pnpm changelogen --canary nightly --bump
33+
npm publish

0 commit comments

Comments
 (0)