Skip to content

Commit

Permalink
Add top-level permission for release
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Aug 8, 2024
1 parent e11f479 commit 9bb85f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
node-version: ${{ matrix.node }}
# cache: npm
- run: npm install
- run: npm run test
- run: npm test
env:
YARN_GPG: no
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Publish Release to npm
on:
release:
types: [published]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,7 +16,7 @@ jobs:
node-version: "20"
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run test
- run: npm test
- if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }}
run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }}
env:
Expand Down

0 comments on commit 9bb85f8

Please sign in to comment.