Skip to content

Publish EVM package #17

Publish EVM package

Publish EVM package #17

Workflow file for this run

name: Publish EVM package
on:
workflow_dispatch: {} # Manual trigger
push:
tags: ["v*"] # Auto-trigger on version tags
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
# Setup Node.js and Yarn
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
# Configure Yarn and NPM registry
- name: Configure registry
run: |
corepack enable
npm config set registry https://registry.npmjs.org/
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAuthToken ${{ secrets.npm_token }}
yarn config set unsafeHttpWhitelist --json '["*.npmjs.org"]'
# Install dependencies
- name: Install dependencies
run: yarn install
# Build packages
- name: Build packages
run: yarn build
# Publish package with proper auth
- name: Publish evm package
run: |
cd packages/evm && yarn npm publish --access public
env:
NPM_CONFIG_REGISTRY: "https://registry.npmjs.org"
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.npm_token }}