Skip to content

NPM Publish

NPM Publish #1

Workflow file for this run

name: NPM Publish
on:
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
name: Publish NPM package
runs-on: smart-contracts-linux-medium
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
with:
version: nightly
- name: Run Forge build
run: |
forge --version
forge build
- name: Install Dependencies
run: npm ci
- name: Run Unit Tests
run: npm run test
- name: Publish NPM package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}