Skip to content

Commit

Permalink
ci: fix github-publish.yml permissions (#59)
Browse files Browse the repository at this point in the history
Use the new permissions syntax in workflow file, and use GITHUB_TOKEN to publish the package
  • Loading branch information
shidil committed Feb 9, 2024
1 parent c501270 commit 396dbd1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/github-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ on:
tags:
- 'v*.*.*'

permissions:
contents: read
packages: write

jobs:
github-publish:
name: github-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://npm.pkg.github.com"
Expand All @@ -27,4 +31,4 @@ jobs:
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 396dbd1

Please sign in to comment.