Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: publish to NPM with provenance #5835

Merged
merged 3 commits into from Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Expand Up @@ -11,6 +11,9 @@ jobs:
publish:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.head.label == 'axios:release')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: "Release PR info"
if: github.event_name != 'workflow_dispatch'
Expand All @@ -22,7 +25,7 @@ jobs:
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- name: get-npm-version
Expand Down Expand Up @@ -50,7 +53,7 @@ jobs:
${{ steps.extract-release-notes.outputs.release_notes }}
############# NPM RELEASE ##############
- name: Publish the release to NPM
run: npm publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
###### NOTIFY & TAG published PRs ######
Expand Down