Skip to content

Commit 5097824

Browse files
[AI] Fix npm publish workflow for first public release
1 parent b10f0a2 commit 5097824

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141

4242
- name: Publish prerelease to npm (next)
4343
if: github.event.release.prerelease == true
44-
run: npm publish --tag next --provenance
44+
run: npm publish --tag next --provenance --access public
4545
env:
4646
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4747

4848
- name: Publish release to npm (latest)
4949
if: github.event.release.prerelease == false
50-
run: npm publish --provenance
50+
run: npm publish --provenance --access public
5151
env:
5252
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ When asked to create commits in this repository:
142142

143143
- 2026-02-18 - Release-driven npm publishing
144144
- Context: Package publication should happen automatically when a GitHub release is published.
145-
- Decision: Add a `publish-npm` GitHub Actions workflow triggered by `release.published`, using `NPM_TOKEN` and validating release tag/version alignment before `npm publish`.
146-
- Consequence: Publishing is automated and guarded against accidental version/tag mismatches.
145+
- Decision: Add a `publish-npm` GitHub Actions workflow triggered by `release.published`, using `NPM_TOKEN`, validating release tag/version alignment, and publishing with `--access public --provenance`.
146+
- Consequence: Publishing is automated, guarded against version/tag mismatches, and works for first-time public package publication with provenance.

0 commit comments

Comments
 (0)