Skip to content

Commit

Permalink
Fix release process: version binaries, patch > 9, testnet.zip file
Browse files Browse the repository at this point in the history
* add LDFLAGS to goreleaser to include in the binary the right, version. Also add a new tag test* to be able to test this solution
* fix error generating testnet.zip
  • Loading branch information
joanestebanr authored Oct 26, 2023
1 parent 5a4e837 commit eea3365
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]' # this action will only run on tags that follow semver

- 'v[0-9]+.[0-9]+.[0-9]+' # this action will only run on tags that follow semver
jobs:
releaser:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -41,7 +40,7 @@ jobs:
mkdir -p testnet/db/scripts
cp config/environments/testnet/* testnet/config/environments/testnet
cp docker-compose.yml testnet
sed -i 's/\/config\/environments\/${ZKEVM_NETWORK}/\/config\/environments\/testnet/g' mainnet/docker-compose.yml
sed -i 's/\/config\/environments\/${ZKEVM_NETWORK}/\/config\/environments\/testnet/g' testnet/docker-compose.yml
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
Expand Down
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ builds:
- arm64
env:
- CGO_ENABLED=0
ldflags:
- -X github.com/0xPolygonHermez/zkevm-node.Version={{.Version}}
- -X github.com/0xPolygonHermez/zkevm-node.GitRev={{.Commit}}
- -X github.com/0xPolygonHermez/zkevm-node.BuildDate={{.Date}}
- -X github.com/0xPolygonHermez/zkevm-node.GitBranch={{.Branch}}
release:
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
Expand Down

0 comments on commit eea3365

Please sign in to comment.