-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (51 loc) · 1.64 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
name: Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: [self-hosted, linux, x64, ephemeral]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python virtualenv
run: pip install virtualenv
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install zip
run: |
sudo apt update
sudo apt install zip
- run: npm install --global ganache-cli
- run: npm install --global yarn
- run: yarn
- run: poetry install
# Ensure that the Deposit's bytecode hasn't changed
- run: poetry run brownie test tests/unit/vault/test_deployAndFetchBatch.py::test_getCreate2Addr --network hardhat
- name: Zip ABIs
run: |
CONTRACT_ARTIFACTS=$(ls ./build/contracts | grep -v dependencies)
while read contract; do
echo $contract
cat build/contracts/$contract | jq .abi > ./$contract
done <<< $CONTRACT_ARTIFACTS
cat ./build/contracts/Deposit.json | jq .bytecode > Deposit_bytecode.json
zip abis.zip $(find . -maxdepth 1 -type f -name "*.json" -not -name "package*.json" -not -path "./.*")
- name: Store contract abis as Artefact
uses: actions/upload-artifact@v2
with:
name: abis
path: |
*.json
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
abis.zip