Skip to content

npm

npm #47

Workflow file for this run

name: npm
on:
release:
types: [created]
workflow_dispatch: {}
workflow_call:
jobs:
publish-npm:
name: Publish npm package
runs-on: ubuntu-latest
permissions:
id-token: write
packages: read
contents: read
security-events: write
timeout-minutes: 15
container:
image: ghcr.io/nayms/contracts-builder:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Install solc
run: svm install 0.7.6 && svm install 0.8.20 && svm use 0.8.20
- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
- name: Install Forge dependencies
run: forge install
- name: Install Node dependencies
run: yarn
- name: Drop-in Test Wallet
run: |
echo "test test test test test test test test test test test junk" > ./nayms_mnemonic.txt
echo "test test test test test test test test test test test junk" > ./nayms_mnemonic_mainnet.txt
- name: Build solidity contracts
run: make build
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }}
BASE_SEPOLIA_RPC_URL: ${{ secrets.BASE_SEPOLIA_RPC_URL }}
- name: Filter ABI
run: make filter-abi
- name: Publish to NPM
run: rm src/generated/.gitignore && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}