Skip to content

Commit

Permalink
📦️ fix publishing on npm
Browse files Browse the repository at this point in the history
  • Loading branch information
qd-qd committed May 8, 2024
1 parent 481f08c commit b63e866
Show file tree
Hide file tree
Showing 3 changed files with 2,341 additions and 2,766 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Publish package to GitHub Packages
name: Publish Package to npmjs

# Trigger the create release workflow
on:
push:
tags:
Expand All @@ -17,24 +16,26 @@ jobs:
id: create_release
uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.SMOOTH_QDQD_SECP256R1_RELEASE_TOKEN }}"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

publish-gpr:
needs: release # wait for the release job to finish
publish:
needs: ["release"]
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
# the test command starts by building the package
- run: npm run test
- run: npm publish
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit b63e866

Please sign in to comment.