Skip to content

Commit 3f1725a

Browse files
Harmeet SinghHarmeet Singh
authored andcommitted
fix the release yml
1 parent ed109fb commit 3f1725a

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: Release (npm)
22

33
on:
44
push:
5-
tags: [ 'v*.*.*' ] # push a tag like v0.0.1 to trigger
5+
tags: ['v*'] # v0.0.1, v1.2.3, etc.
6+
workflow_dispatch: {}
67

78
jobs:
89
publish:
910
runs-on: ubuntu-latest
1011
permissions:
1112
contents: read
12-
id-token: write # for --provenance; remove if you don't want it
13+
id-token: write # required for --provenance
1314
steps:
1415
- uses: actions/checkout@v4
1516

@@ -18,13 +19,20 @@ jobs:
1819
node-version: '20'
1920
registry-url: 'https://registry.npmjs.org'
2021

21-
- name: Install (pnpm via npx)
22+
# install & build (pnpm via npx so we don't need a pnpm setup step)
23+
- name: Install deps
2224
run: npx -y pnpm@9 install --frozen-lockfile
2325

2426
- name: Build
2527
run: npx -y pnpm@9 build
2628

29+
# sanity: confirm what we will publish
30+
- name: Show publish target
31+
run: node -e "const p=require('./dist/package.json'); console.log('Publishing:', p.name, p.version)"
32+
33+
# ✅ publish from inside ./dist
2734
- name: Publish to npm
28-
run: npm publish dist --access public --provenance
35+
working-directory: dist
2936
env:
3037
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)