Skip to content

Commit 1cca974

Browse files
authored
Merge pull request #4 from Priestch/copilot/fix-new-error-latest-release-action
Fix Release workflow publish auth path for scoped npm packages
2 parents 8e188bf + c94f317 commit 1cca974

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,21 @@ jobs:
2424

2525
- run: npm ci
2626

27-
- name: Create Release Pull Request or Publish
27+
- name: Create Release Pull Request or Publish (NPM token)
28+
if: ${{ secrets.NPM_TOKEN != '' }}
29+
uses: changesets/action@v1
30+
with:
31+
publish: npm run release
32+
version: npm run version
33+
commit: "chore: release packages"
34+
title: "chore: release packages"
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
NPM_CONFIG_PROVENANCE: true
39+
40+
- name: Create Release Pull Request or Publish (Trusted Publisher)
41+
if: ${{ secrets.NPM_TOKEN == '' }}
2842
uses: changesets/action@v1
2943
with:
3044
publish: npm run release

0 commit comments

Comments
 (0)