Skip to content

Commit a834d7b

Browse files
committed
🚀 fix npm publishing
1 parent 0bd1624 commit a834d7b

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

.github/workflows/release-package.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
id: create_release
2020
uses: "marvinpinto/[email protected]"
2121
with:
22-
repo_token: "${{ secrets.SMOOTH_QDQD_SECP256R1_RELEASE_TOKEN }}"
22+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
2323
prerelease: false
2424

2525
deploy-doc:
@@ -47,15 +47,13 @@ jobs:
4747
publish-gpr:
4848
needs: ["release"]
4949
runs-on: ubuntu-latest
50-
permissions:
51-
packages: write
52-
contents: read
5350
steps:
54-
- uses: actions/checkout@v3
55-
- uses: actions/setup-node@v3
51+
- uses: actions/checkout@v4
52+
# Setup .npmrc file to publish to npm
53+
- uses: actions/setup-node@v4
5654
with:
57-
node-version: 18
58-
registry-url: https://npm.pkg.github.com/
59-
- run: npm publish
55+
node-version: "20.x"
56+
registry-url: "https://registry.npmjs.org"
57+
- run: npm publish --provenance --access public
6058
env:
61-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
node_modules
33

44
# the directory where all the tests belong
5-
tests
5+
test
6+
7+
# the directory where all the build files belong
8+
out

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
> This repository is currently under development and not ready for production use ⚠️
1+
> ❌ This repository is deprecated. Please refer to the [crypto-lib](https://github.com/get-smooth/CryptoLib) repository
2+
> to find the latest implementation of the secp256r1 curve.
23
34
# secp256r1 verify
45

@@ -10,21 +11,16 @@
1011

1112
[github-editor-url]: https://github.dev/get-smooth/secp256r1-verify/tree/main
1213
[github-editor-badge]: https://img.shields.io/badge/Github-Open%20the%20Editor-purple?logo=github
13-
[gha-quality-url]:
14-
https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml
14+
[gha-quality-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml
1515
[gha-quality-badge]:
1616
https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml/badge.svg?branch=main
1717
[gha-test-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml
18-
[gha-test-badge]:
19-
https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
20-
[gha-static-analysis-url]:
21-
https://github.com/get-smooth/secp256r1-verify/actions/workflows/static-analysis.yml
18+
[gha-test-badge]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
19+
[gha-static-analysis-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/static-analysis.yml
2220
[gha-static-analysis-badge]:
2321
https://github.com/get-smooth/template-foundry/actions/workflows/static-analysis.yml/badge.svg?branch=main
24-
[gha-release-url]:
25-
https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml
26-
[gha-release-badge]:
27-
https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml/badge.svg
22+
[gha-release-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml
23+
[gha-release-badge]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml/badge.svg
2824
[foundry]: https://book.getfoundry.sh/
2925
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
3026
[license]: ./LICENSE.md
@@ -53,6 +49,16 @@ This command will install the latest version of the package in your lib director
5349
library, follow the instructions in the
5450
[official Foundry documentation](https://book.getfoundry.sh/reference/forge/forge-install?highlight=forge%20install#forge-install).
5551

52+
### Hardhat or Truffle
53+
54+
To install the `secp256r1-verify` package in a Hardhat or Truffle project, use `npm` to run the following command:
55+
56+
```sh
57+
npm install @smoo.th/secp256r1-verify
58+
```
59+
60+
After the installation, import the package into your project and use it.
61+
5662
## Usage
5763

5864
This repository provides a unique verification implementation. After you've integrated this library into your project,
@@ -82,8 +88,7 @@ scripts are expected to be run using the `forge script` command.
8288
## Gas reports
8389

8490
These gas reports were produced using the `0.8.19` version of the Solidity compiler (with 100k optimizer runs),
85-
specifically for the
86-
[`0.4.1`](https://github.com/get-smooth/secp256r1-verify/releases/tag/v0.4.1) version of the
91+
specifically for the [`0.4.1`](https://github.com/get-smooth/secp256r1-verify/releases/tag/v0.4.1) version of the
8792
library. The library version corresponds to commit
8893
[4d0716f](https://github.com/get-smooth/secp256r1-verify/commit/4d0716fc6fd14a92488442e1dd0c18bb2c24ff41).
8994

0 commit comments

Comments
 (0)