-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (39 loc) · 1.18 KB
/
push_main.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
43
44
45
46
47
48
49
50
51
name: Export ABI workflow
on:
push:
branches:
- main
jobs:
exports-abi:
name: "Export ABI's"
runs-on: ubuntu-latest
environment: testnet #change to mainnet before production
strategy:
matrix:
node-version: ['20.x']
env:
RPC_URL: ${{ secrets.RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install --global yarn
- name: Install Dependencies
run: yarn install
- name: Compile
run: yarn run compile
- name: Extract and publish ABIs
run: |
mkdir -p data/abis
find ./artifacts/contracts -type f -name "*.json" ! -name "*.dbg.json" -exec cp {} data/abis/ \;
- name: Upload ABI
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_options: '--no-verify --signoff'
push_options: '--force'
file_pattern: './data/abis/*.json'