Skip to content

Commit

Permalink
🚀 fix npm publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
qd-qd committed May 8, 2024
1 parent 0bd1624 commit a834d7b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id: create_release
uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.SMOOTH_QDQD_SECP256R1_RELEASE_TOKEN }}"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

deploy-doc:
Expand Down Expand Up @@ -47,15 +47,13 @@ jobs:
publish-gpr:
needs: ["release"]
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
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/
- run: npm publish
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
node_modules

# the directory where all the tests belong
tests
test

# the directory where all the build files belong
out
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
> This repository is currently under development and not ready for production use ⚠️
> ❌ This repository is deprecated. Please refer to the [crypto-lib](https://github.com/get-smooth/CryptoLib) repository
> to find the latest implementation of the secp256r1 curve.
# secp256r1 verify

Expand All @@ -10,21 +11,16 @@

[github-editor-url]: https://github.dev/get-smooth/secp256r1-verify/tree/main
[github-editor-badge]: https://img.shields.io/badge/Github-Open%20the%20Editor-purple?logo=github
[gha-quality-url]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml
[gha-quality-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml
[gha-quality-badge]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/quality-checks.yml/badge.svg?branch=main
[gha-test-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml
[gha-test-badge]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
[gha-static-analysis-url]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/static-analysis.yml
[gha-test-badge]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
[gha-static-analysis-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/static-analysis.yml
[gha-static-analysis-badge]:
https://github.com/get-smooth/template-foundry/actions/workflows/static-analysis.yml/badge.svg?branch=main
[gha-release-url]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml
[gha-release-badge]:
https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml/badge.svg
[gha-release-url]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml
[gha-release-badge]: https://github.com/get-smooth/secp256r1-verify/actions/workflows/release-package.yml/badge.svg
[foundry]: https://book.getfoundry.sh/
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
[license]: ./LICENSE.md
Expand Down Expand Up @@ -53,6 +49,16 @@ This command will install the latest version of the package in your lib director
library, follow the instructions in the
[official Foundry documentation](https://book.getfoundry.sh/reference/forge/forge-install?highlight=forge%20install#forge-install).

### Hardhat or Truffle

To install the `secp256r1-verify` package in a Hardhat or Truffle project, use `npm` to run the following command:

```sh
npm install @smoo.th/secp256r1-verify
```

After the installation, import the package into your project and use it.

## Usage

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

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

Expand Down

0 comments on commit a834d7b

Please sign in to comment.