Skip to content

release

release #848

Workflow file for this run

---
name: release
defaults:
run:
shell: bash
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Install dependencies
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils
- name: Install git-cliff
uses: baptiste0928/cargo-install@v3
with:
crate: git-cliff
- name: Detect required Go version
run: |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
- name: set environment
uses: HatsuneMiku3939/direnv-action@v1
with:
masks: ''
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set release version into env variable
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Make and publish
run: |
sudo rm -rf dist
make release
env:
GORELEASER_RELEASE: true
GORELEASER_MOUNT_CONFIG: true
# using PAT as homebrew is located in different repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test-network-upgrade-on-release:
runs-on: gh-runner-test
needs:
- publish
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Detect required Go version
run: |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
- name: Install dependencies
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils
- name: Install git-cliff
uses: baptiste0928/cargo-install@v3
with:
crate: git-cliff
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
- name: set environment
uses: HatsuneMiku3939/direnv-action@v1
with:
masks: ''
- name: detect release tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: configure variables
run: |
test_required=$(./script/upgrades.sh test-required ${{ env.RELEASE_TAG }})
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
- name: run test
if: env.TEST_REQUIRED != ''
env:
UPGRADE_BINARY_VERSION: ${{ env.RELEASE_TAG }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEST_CONFIG: test-config-gha.json
run: |
cd tests/upgrade
make test
- name: upload validator(s) stdout/stderr
if: always() && steps.test.outcome != 'skipped'
uses: actions/upload-artifact@v4
with:
name: logs
path: |
.cache/run/upgrade/validators/logs/.akash*.log
notify-homebrew:
runs-on: ubuntu-latest
needs:
- publish
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: release version
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: check if pre-release
id: check
run: |
is_prerelease=$(./script/is_prerelease.sh ${{ env.RELEASE_TAG }}; echo $?)
is_mainnet=$(./script/mainnet-from-tag.sh ${{ env.RELEASE_TAG }}; echo $?)
echo "is_prerelease=${is_prerelease}" >> $GITHUB_OUTPUT
echo "is_mainnet=${is_mainnet}" >> $GITHUB_OUTPUT
- name: notify homebrew with a new release
if: contains(steps.check.outputs.is_mainnet, '0') && contains(steps.check.outputs.is_prerelease, '1')
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.GORELEASER_ACCESS_TOKEN }}
repo: akash-network/homebrew-tap
ref: refs/heads/main
workflow: akash
inputs: '{"tag": "${{ env.RELEASE_TAG }}"}'