Skip to content

Commit b634ee7

Browse files
authored
Merge pull request #17 from RaviDasari/copilot/fix-npm-package-publishing-error
Fix release-please authentication failure in npm publish workflow
2 parents 54895bc + a8966bf commit b634ee7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
publish-npm:
3030
needs: test
3131
runs-on: ubuntu-latest
32+
permissions:
33+
contents: write
34+
pull-requests: write
3235
steps:
3336
- uses: actions/checkout@v4
3437
- uses: actions/setup-node@v4
@@ -41,19 +44,13 @@ jobs:
4144
npm ci --legacy-peer-deps
4245
rm -rf dist
4346
npm run build-ci
44-
ls #see where the buil files are
45-
- name: Commit files
47+
ls #see where the build files are
48+
- name: Create Release PR
4649
run: |
4750
git config --local user.email "[email protected]"
4851
git config --local user.name "GitHub Actions"
49-
npm run release
50-
git push --follow-tags origin master
52+
npx release-please release-pr --repo-url=https://github.com/RaviDasari/see-image-diff --token=${{ secrets.GITHUB_TOKEN }}
5153
52-
- name: Push changes
53-
uses: ad-m/[email protected]
54-
with:
55-
github_token: ${{secrets.GITHUB_TOKEN}}
56-
force: true
5754
- name: Publish
5855
run: |
5956
npm publish

0 commit comments

Comments
 (0)