Skip to content

Commit

Permalink
rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Nov 7, 2023
2 parents 8d17a72 + e8161c5 commit fa5a475
Show file tree
Hide file tree
Showing 505 changed files with 29,188 additions and 2,381 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
echo "Smoke Test Failed"
exit 1
fi
sleep 10
- name: Stop Private Network
if: always()
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/chain-operations.yml

This file was deleted.

126 changes: 0 additions & 126 deletions .github/workflows/deploy.yml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/generate-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ jobs:
run: |
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate Go code from proto files
run: make proto

- name: Generate OpenAPI
run: make openapi

- name: Generate Module Documentation
run: make specs
- name: Generate Go code, docs and specs
run: make generate

- name: Check for changes
run: |
Expand Down
89 changes: 58 additions & 31 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
name: Publish Release

on:
push:
tags:
- "v*.*.*"

pull_request:
types:
- closed
branches:
- 'main'
workflow_dispatch:
inputs:
version:
description: 'Version for manual hotfix release.'
required: false
default: ''

concurrency:
group: publish-release
cancel-in-progress: false

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

jobs:
pre-release-checks:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set Version from the PR title.
if: github.event_name == 'pull_request'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.pull_request.title }}" >> ${GITHUB_ENV}
- name: Set Version for Hotfix Release from Input.
if: github.event_name != 'pull_request'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.inputs.version }}" >> ${GITHUB_ENV}
- name: Major Version in Upgrade Handler Must Match Tag
run: |
UPGRADE_HANDLER_MAJOR_VERSION=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"' | cut -d '.' -f1)
Expand All @@ -34,13 +50,29 @@ jobs:
echo "The major version found in 'releaseVersion' in app/setup_handlers.go matches this tagged release - Moving Forward!"
publish-release:
if: github.event.pull_request.merged == true
runs-on: buildjet-4vcpu-ubuntu-2004
timeout-minutes: 60
needs:
- pre-release-checks
steps:
- uses: actions/checkout@v3

- name: Echo Release Notes from PR Message.
if: github.event_name == 'pull_request'
run: |
echo -e "${{ github.event.head_commit.message }}" > Release.txt
- name: Set Version from the PR title.
if: github.event_name == 'pull_request'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.pull_request.title }}" >> ${GITHUB_ENV}
- name: Set Version for Hotfix Release from Input.
if: github.event_name != 'pull_request'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.inputs.version }}" >> ${GITHUB_ENV}
- name: Set CPU Architecture
shell: bash
run: |
Expand All @@ -62,7 +94,15 @@ jobs:
skip_aws_cli: "true"
skip_docker_compose: "true"

- name: Create GitHub Release
- name: Create GitHub Release on Pull Request
if: github.event_name == 'pull_request'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
files: Release.txt

- name: Create GitHub Release Hot Fix
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
Expand All @@ -75,17 +115,17 @@ jobs:
touch .release-env
make release
## TODO - Will add in later after optimizing docker images
# - name: Build, tag, and push docker images
# uses: ./.github/actions/build-docker-images
# with:
# DOCKER_FILENAME: Dockerfile
# REPOSITORY_NAME: zeta-node
# IMAGE_TAG: ${{ env.TAG_NAME }}
# GHCR_USERNAME: ${{ secrets.PAT_GITHUB_SERVICE_ACCT_USERNAME }}
# GHCR_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
- name: Build, tag, and push docker images
uses: ./.github/actions/build-docker-images
with:
DOCKER_FILENAME: Dockerfile-relese
REPOSITORY_NAME: zeta-node
IMAGE_TAG: ${{ env.GITHUB_TAG_MAJOR_VERSION }}
GHCR_USERNAME: ${{ secrets.PAT_GITHUB_SERVICE_ACCT_USERNAME }}
GHCR_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

build-alpine:
if: github.event.pull_request.merged == true
runs-on: ["ubuntu-latest"]
timeout-minutes: 30
concurrency:
Expand Down Expand Up @@ -175,6 +215,7 @@ jobs:
run: rm -rf *

announce-release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
Expand Down Expand Up @@ -213,20 +254,6 @@ jobs:
See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}
# - name: "SEND:DISCORD:MESSAGE"
# if: steps.determine_release_type.outputs.RELEASE_TYPE == 'minor'
# uses: gzukel/CosmosComposites/send_discord_message@main
# with:
# discord_token: "${{ secrets.DISCORD_TOKEN }}"
# discord_channel_id: "${{ secrets.DISCORD_CHANNEL_ID }}"
# discord_message: |
# Hey <@&1122981184255840306>! A new version of the zetachain node has been released.

# Minor Version Upgrade (e.g. v5.0.x to v5.1.x) can be applied without a governance proposal.
# Please review the release notes for any specific upgrade instructions or considerations.

# See the release notes for more details. https://github.com/zeta-chain/node/releases/tag/${{ env.BINARY_VERSION }}

- name: Clean Up Workspace
if: always()
shell: bash
Expand Down
Loading

0 comments on commit fa5a475

Please sign in to comment.