Skip to content

Commit

Permalink
feat: add npm provenance (#5656)
Browse files Browse the repository at this point in the history
  • Loading branch information
khendrikse authored Apr 24, 2023
1 parent 0642908 commit 8861256
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
prerelease:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -39,6 +42,6 @@ jobs:
- name: Push changes
run: git push --follow-tags
- name: Run npm publish
run: npm publish --tag=${{ steps.extract.outputs.tag }}
run: npm publish --tag=${{ steps.extract.outputs.tag }} --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6 changes: 5 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:

publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
needs: create-release
if: ${{ needs.create-release.outputs.release_created }}
steps:
Expand All @@ -38,6 +42,6 @@ jobs:
- name: Install core dependencies
run: npm ci --no-audit

- run: npm publish
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"static"
],
"license": "MIT",
"repository": "netlify/cli",
"repository": "https://github.com/netlify/cli",
"bin": {
"ntl": "./bin/run.mjs",
"netlify": "./bin/run.mjs"
Expand Down

1 comment on commit 8861256

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Package size: 305 MB

Please sign in to comment.