Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 416f1aa

Browse files
committedMay 8, 2024··
📦️ fix publishing on npm
1 parent 481f08c commit 416f1aa

File tree

3 files changed

+2338
-2781
lines changed

3 files changed

+2338
-2781
lines changed
 

‎.github/workflows/release-package.yml

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,23 @@
1-
name: Publish package to GitHub Packages
1+
name: Publish Package to npmjs
22

3-
# Trigger the create release workflow
43
on:
54
push:
65
tags:
76
- "v*"
87

98
jobs:
10-
release:
11-
name: Create Release
9+
build:
1210
runs-on: ubuntu-latest
1311
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
16-
- name: Create Release
17-
id: create_release
18-
uses: "marvinpinto/action-automatic-releases@v1.2.1"
12+
- uses: actions/checkout@v4
13+
# Setup .npmrc file to publish to npm
14+
- uses: actions/setup-node@v4
1915
with:
20-
repo_token: "${{ secrets.SMOOTH_QDQD_SECP256R1_RELEASE_TOKEN }}"
21-
prerelease: false
22-
23-
publish-gpr:
24-
needs: release # wait for the release job to finish
25-
runs-on: ubuntu-latest
26-
permissions:
27-
packages: write
28-
contents: read
29-
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions/setup-node@v3
32-
with:
33-
node-version: 18
34-
registry-url: https://npm.pkg.github.com/
16+
node-version: '20.x'
17+
registry-url: 'https://registry.npmjs.org'
3518
- run: npm ci
3619
# the test command starts by building the package
3720
- run: npm run test
38-
- run: npm publish
21+
- run: npm publish --provenance --access public
3922
env:
40-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.