-
Notifications
You must be signed in to change notification settings - Fork 697
64 lines (55 loc) · 2.12 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
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@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Get packr
run: go install github.com/gobuffalo/packr/v2/[email protected]
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }}
- name: Get tag
uses: olegtarasov/[email protected]
id: tagName
- name: Put testnet and mainnet artifacts into a single zip
run: |
# TESTNET
mkdir -p testnet/config/environments/testnet
mkdir -p testnet/db/scripts
cp config/environments/testnet/* testnet/config/environments/testnet
cp docker-compose.yml testnet
cp db/scripts/init_prover_db.sql testnet/db/scripts
mv testnet/config/environments/testnet/example.env testnet
sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" testnet/docker-compose.yml
zip -r testnet.zip testnet
# 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
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 testnet and mainnet zip into release
uses: AButler/[email protected]
with:
files: 'testnet.zip;mainnet.zip'
repo-token: ${{ secrets.TOKEN_RELEASE }}
release-tag: ${{ steps.tagName.outputs.tag }}