-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 991 Bytes
/
publish_npm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Publish Package to NPM
on:
release:
types: [published]
jobs:
build:
timeout-minutes: 30
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install Foundry so we can generate ABIs
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# Generate ABIs
- name: Run Forge build
run: forge build
# Setup Node so we can generate TypeScript types
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
registry-url: "https://registry.npmjs.org"
scope: "@trillion-x"
# Publish ABIs to NPM
- name: Publish to NPM
run: |
npm config set version-git-tag false
npm version --new-version $(git describe --tags)
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}