Skip to content

Commit 4c9ce09

Browse files
committed
cleaned up for pr
1 parent 763f7c0 commit 4c9ce09

File tree

3 files changed

+128
-153
lines changed

3 files changed

+128
-153
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
name: PR Testing
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
- athens2-develop
8-
- ci-goreleaser
94
pull_request:
105
branches:
116
- develop
12-
- athens2-develop
137
types:
148
- synchronize
159
- opened
1610
- reopened
1711
- ready_for_review
1812

1913
concurrency:
20-
group: CI-test-build-${{ github.head_ref || github.run_id }}
14+
group: pr-testing-${{ github.head_ref || github.run_id }}
2115
cancel-in-progress: true
2216

2317
env:
@@ -28,11 +22,8 @@ env:
2822

2923
jobs:
3024
build-and-test:
31-
# runs-on: ubuntu-latest
3225
runs-on: buildjet-4vcpu-ubuntu-2004
33-
# runs-on: ["zeta-runners"] # 10 minutes
34-
timeout-minutes: 20
35-
if: (! startsWith(github.ref, 'refs/tags/')) || (! startsWith(github.ref, 'refs/heads/develop') )
26+
timeout-minutes: 15
3627
concurrency:
3728
group: "build-and-test"
3829
steps:
@@ -87,10 +78,8 @@ jobs:
8778
run: rm -rf *
8879

8980
smoke-test:
90-
# runs-on: ["zeta-runners"] # 20 minutes
91-
runs-on: buildjet-4vcpu-ubuntu-2004
92-
#runs-on: ubuntu-latest
93-
timeout-minutes: 20
81+
runs-on: ["zeta-runners"] # 20 minutes
82+
timeout-minutes: 25
9483
steps:
9584
- uses: actions/checkout@v3
9685

@@ -149,4 +138,3 @@ jobs:
149138
run: rm -rf *
150139

151140

152-

.github/workflows/publish-release.yml

Lines changed: 66 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Release
1+
name: Publish Release
22

33
on:
44
push:
55
tags:
66
- "v*.*.*"
77

8-
concurrency:
8+
concurrency:
99
group: publish-release
1010
cancel-in-progress: false
1111

1212
env:
1313
GITHUB_REF_NAME: "$(echo ${{ github.ref_name }} | tr '//' '-')"
1414

1515
jobs:
16-
upgrade_handler_version_check:
16+
pre-release-checks:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 10
1919
steps:
@@ -35,10 +35,9 @@ jobs:
3535
3636
publish-release:
3737
runs-on: buildjet-4vcpu-ubuntu-2004
38-
# runs-on: ubuntu-latest
3938
timeout-minutes: 60
4039
needs:
41-
- upgrade_handler_version_check
40+
- pre-release-checks
4241
steps:
4342
- uses: actions/checkout@v3
4443

@@ -68,8 +67,6 @@ jobs:
6867
with:
6968
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
7069
generate_release_notes: true
71-
# files: |
72-
# dist/checksums.txt
7370

7471
- name: Publish Release Files
7572
env:
@@ -78,6 +75,7 @@ jobs:
7875
touch .release-env
7976
make release
8077
78+
## TODO - Will add in later after optimizing docker images
8179
# - name: Build, tag, and push docker images
8280
# uses: ./.github/actions/build-docker-images
8381
# with:
@@ -86,14 +84,14 @@ jobs:
8684
# IMAGE_TAG: ${{ env.TAG_NAME }}
8785
# GHCR_USERNAME: ${{ secrets.PAT_GITHUB_SERVICE_ACCT_USERNAME }}
8886
# GHCR_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
89-
87+
9088
build-alpine:
9189
runs-on: ["ubuntu-latest"]
9290
timeout-minutes: 30
9391
concurrency:
9492
group: "alpine-build-test"
9593
needs:
96-
- upgrade_handler_version_check
94+
- pre-release-checks
9795
steps:
9896
- uses: actions/checkout@v3
9997

@@ -163,75 +161,73 @@ jobs:
163161
files: |
164162
zetacored-*
165163
zetaclientd-*
166-
164+
167165
- name: Clean Up Alpine Workspace
168166
if: always()
169167
shell: alpine.sh --root {0}
170168
run: |
171169
set -e # fail on error
172170
rm -rf *
173-
171+
174172
- name: Clean Up Workspace
175173
if: always()
176174
shell: bash
177175
run: rm -rf *
178176

179-
180-
# announce-release:
181-
# # runs-on: buildjet-2vcpu-ubuntu-2004
182-
# runs-on: ubuntu-latest
183-
# timeout-minutes: 10
184-
# needs:
185-
# - publish-release
186-
# - build-alpine
187-
# steps:
188-
# - uses: actions/checkout@v3
189-
# - name: Get Version
190-
# run: |
191-
# VERSION=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"')
192-
# echo "BINARY_VERSION=${VERSION}" >> ${GITHUB_ENV}
193-
194-
# - name: Determine Release Type
195-
# id: determine_release_type
196-
# run: |
197-
# if [[ "${{ env.BINARY_VERSION }}" =~ ^v[0-9]+\.0\.0+$ ]]; then
198-
# echo "RELEASE_TYPE=major" >> ${GITHUB_ENV}
199-
# elif [[ "${{ env.BINARY_VERSION }}" =~ ^v[0-9]+\.[0-9]+\.[1-9]+$ ]]; then
200-
# echo "RELEASE_TYPE=minor" >> ${GITHUB_ENV}
201-
# else
202-
# echo "RELEASE_TYPE=unknown" >> ${GITHUB_ENV}
203-
# fi
204-
205-
# - name: "SEND:DISCORD:MESSAGE"
206-
# if: steps.determine_release_type.outputs.RELEASE_TYPE == 'major'
207-
# uses: gzukel/CosmosComposites/send_discord_message@main
208-
# with:
209-
# discord_token: "${{ secrets.DISCORD_TOKEN }}"
210-
# discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
211-
# discord_message: |
212-
# Hey <@&1122981184255840306>! A new version of the ZetaChain software has been released.
213-
214-
# Major Version Upgrade (e.g. v5.x.x to V6.x.x) must be completed through a governance proposal.
215-
# We will submit a governance proposal in the next few days.
216-
# More specific information including block height will be shared as part of the governance proposal.
217-
218-
# See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
219-
220-
# # - name: "SEND:DISCORD:MESSAGE"
221-
# # if: steps.determine_release_type.outputs.RELEASE_TYPE == 'minor'
222-
# # uses: gzukel/CosmosComposites/send_discord_message@main
223-
# # with:
224-
# # discord_token: "${{ secrets.DISCORD_TOKEN }}"
225-
# # discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
226-
# # discord_message: |
227-
# # Hey <@&1122981184255840306>! A new version of the zetachain node has been released.
228-
229-
# # Minor Version Upgrade (e.g. v5.0.x to v5.1.x) can be applied without a governance proposal.
230-
# # Please review the release notes for any specific upgrade instructions or considerations.
231-
232-
# # See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
233-
234-
# - name: Clean Up Workspace
235-
# if: always()
236-
# shell: bash
237-
# run: rm -rf *
177+
announce-release:
178+
runs-on: ubuntu-latest
179+
timeout-minutes: 10
180+
needs:
181+
- publish-release
182+
- build-alpine
183+
steps:
184+
- uses: actions/checkout@v3
185+
- name: Get Version
186+
run: |
187+
VERSION=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"')
188+
echo "BINARY_VERSION=${VERSION}" >> ${GITHUB_ENV}
189+
190+
- name: Determine Release Type
191+
id: determine_release_type
192+
run: |
193+
if [[ "${{ env.BINARY_VERSION }}" =~ ^v[0-9]+\.0\.0+$ ]]; then
194+
echo "RELEASE_TYPE=major" >> ${GITHUB_ENV}
195+
elif [[ "${{ env.BINARY_VERSION }}" =~ ^v[0-9]+\.[0-9]+\.[1-9]+$ ]]; then
196+
echo "RELEASE_TYPE=minor" >> ${GITHUB_ENV}
197+
else
198+
echo "RELEASE_TYPE=unknown" >> ${GITHUB_ENV}
199+
fi
200+
201+
- name: "SEND:DISCORD:MESSAGE"
202+
if: steps.determine_release_type.outputs.RELEASE_TYPE == 'major'
203+
uses: gzukel/CosmosComposites/send_discord_message@main
204+
with:
205+
discord_token: "${{ secrets.DISCORD_TOKEN }}"
206+
discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
207+
discord_message: |
208+
Hey <@&1122981184255840306>! A new version of the ZetaChain software has been released.
209+
210+
Major Version Upgrade (e.g. v5.x.x to V6.x.x) must be completed through a governance proposal.
211+
We will submit a governance proposal in the next few days.
212+
More specific information including block height will be shared as part of the governance proposal.
213+
214+
See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
215+
216+
# - name: "SEND:DISCORD:MESSAGE"
217+
# if: steps.determine_release_type.outputs.RELEASE_TYPE == 'minor'
218+
# uses: gzukel/CosmosComposites/send_discord_message@main
219+
# with:
220+
# discord_token: "${{ secrets.DISCORD_TOKEN }}"
221+
# discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
222+
# discord_message: |
223+
# Hey <@&1122981184255840306>! A new version of the zetachain node has been released.
224+
225+
# Minor Version Upgrade (e.g. v5.0.x to v5.1.x) can be applied without a governance proposal.
226+
# Please review the release notes for any specific upgrade instructions or considerations.
227+
228+
# See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
229+
230+
- name: Clean Up Workspace
231+
if: always()
232+
shell: bash
233+
run: rm -rf *

0 commit comments

Comments
 (0)