mirror of
https://github.com/AtHeartEngineer/spartan-ecdsa.git
synced 2026-01-09 21:38:02 -05:00
Add Github Action workflow for deploying the npm package
This commit is contained in:
40
.github/workflows/publish.yaml
vendored
Normal file
40
.github/workflows/publish.yaml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Publish Package to npmjs
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.ref_name }}
|
||||
# Setup Node.js
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
# Setup Rust
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
# Install circom-secq
|
||||
- uses: GuillaumeFalourd/clone-github-repo-action@v2
|
||||
with:
|
||||
owner: "DanTehrani"
|
||||
repository: "circom-secq"
|
||||
- run: cd circom-secq && cargo build --release && cargo install --path circom
|
||||
# Install wasm-pack
|
||||
- uses: jetli/wasm-pack-action@v0.4.0
|
||||
with:
|
||||
version: "0.10.3"
|
||||
- run: cargo test
|
||||
- run: yarn
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
- run: yarn publish
|
||||
working-directory: ./packages/lib
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -6,7 +6,8 @@
|
||||
"repository": "https://github.com/DanTehrani/spartan-wasm.git",
|
||||
"author": "Daniel Tehrani <contact@dantehrani.com>",
|
||||
"scripts": {
|
||||
"build": "sh ./scripts/build.sh && lerna run build"
|
||||
"build": "sh ./scripts/build.sh && lerna run build",
|
||||
"test": "sh ./scripts/test.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.2.4",
|
||||
|
||||
2
scripts/test.sh
Normal file
2
scripts/test.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
cargo test --release &&
|
||||
yarn lerna run test
|
||||
Reference in New Issue
Block a user