-
Notifications
You must be signed in to change notification settings - Fork 718
65 lines (57 loc) · 2.39 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
63
64
65
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # this action will only run on tags that follow semver
jobs:
releaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Get packr
run: go install github.com/gobuffalo/packr/v2/[email protected]
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }}
- name: Get tag
uses: olegtarasov/[email protected]
id: tagName
- name: Put cardona, testnet and mainnet artifacts into a single zip
run: |
# CARDONA
mkdir -p cardona/config/environments/cardona
mkdir -p cardona/db/scripts
cp config/environments/cardona/* cardona/config/environments/cardona
cp docker-compose.yml cardona
sed -i 's/\/config\/environments\/${ZKEVM_NETWORK}/\/config\/environments\/cardona/g' cardona/docker-compose.yml
cp db/scripts/init_prover_db.sql cardona/db/scripts
mv cardona/config/environments/cardona/example.env cardona
sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" cardona/docker-compose.yml
zip -r cardona.zip cardona
# MAINNET
mkdir -p mainnet/config/environments/mainnet
mkdir -p mainnet/db/scripts
cp config/environments/mainnet/* mainnet/config/environments/mainnet
cp docker-compose.yml mainnet
sed -i 's/\/config\/environments\/${ZKEVM_NETWORK}/\/config\/environments\/mainnet/g' mainnet/docker-compose.yml
cp db/scripts/init_prover_db.sql mainnet/db/scripts
mv mainnet/config/environments/mainnet/example.env mainnet
sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" mainnet/docker-compose.yml
zip -r mainnet.zip mainnet
- name: Publish cardona, testnet and mainnet zip into release
uses: AButler/[email protected]
with:
files: 'cardona.zip;testnet.zip;mainnet.zip'
repo-token: ${{ secrets.TOKEN_RELEASE }}
release-tag: ${{ steps.tagName.outputs.tag }}