Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/claude-code-review.yml

This file was deleted.

148 changes: 143 additions & 5 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Publish Release

on:
workflow_dispatch: # manual trigger
workflow_dispatch:
inputs:
release_tag:
description: "Release tag to publish (e.g. v29.0.1). Defaults to github.ref_name."
required: false
type: string
release: # triggered by release event
types: [published]
# Notice:
Expand All @@ -16,8 +21,31 @@ permissions:
contents: write

jobs:
resolve-tag:
name: Resolve Release Tag
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
is_rc: ${{ steps.tag.outputs.is_rc }}
steps:
- name: Determine release tag
id: tag
run: |
TAG="${RELEASE_TAG_INPUT:-${RELEASE_TAG_EVENT:-${REF_NAME}}}"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
if [[ "$TAG" == *-rc* ]]; then
echo "is_rc=true" >> "$GITHUB_OUTPUT"
else
echo "is_rc=false" >> "$GITHUB_OUTPUT"
fi
env:
RELEASE_TAG_INPUT: ${{ inputs.release_tag }}
RELEASE_TAG_EVENT: ${{ github.event.release.tag_name }}
REF_NAME: ${{ github.ref_name }}

publish-fury:
name: Publish to Fury
needs: resolve-tag
runs-on: ubicloud-standard-2

steps:
Expand All @@ -37,9 +65,10 @@ jobs:
- name: Download release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ needs.resolve-tag.outputs.tag }}
run: |
mkdir -p dist
gh release download ${{ github.ref_name }} \
gh release download "$RELEASE_TAG" \
--repo ${{ github.repository }} \
--dir dist \
--pattern 'xiond*'
Expand Down Expand Up @@ -96,14 +125,14 @@ jobs:
- name: Install syft
uses: anchore/sbom-action/download-syft@v0

- name: Run GoReleaser (Fury only)
- name: Run GoReleaser (packages + homebrew)
uses: goreleaser/goreleaser-action@v6
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
RELEASE_OWNER: ${{ github.repository_owner }}
RELEASE_REPO: ${{ github.event.repository.name }}
RELEASE_REPO: xion
SKIP_GITHUB_RELEASE: "true"
GPG_KEY_ID: ${{ steps.import_pkg_gpg.outputs.keyid }}
GPG_KEY_PATH: /home/runner/.gnupg/sign.asc
Expand All @@ -116,8 +145,117 @@ jobs:
version: "~> v2"
args: release --config .goreleaser/release.yaml --skip=announce,validate

- name: Upload packages to Gemfury
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
run: |
FAILED=0
for pkg in release/*.deb release/*.rpm release/*.apk; do
[ -f "$pkg" ] || continue
BASENAME=$(basename "$pkg")
echo "Uploading ${BASENAME}..."
RESPONSE=$(curl -sS -w "\n%{http_code}" \
-F "package=@${pkg}" \
"https://${FURY_TOKEN}@push.fury.io/burnt/")
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
echo " ✅ ${BASENAME} (HTTP ${HTTP_CODE})"
elif [ "$HTTP_CODE" = "409" ]; then
echo " ⏭️ ${BASENAME} already exists (HTTP 409)"
else
echo " ❌ ${BASENAME} FAILED (HTTP ${HTTP_CODE})"
echo " Response: ${BODY}"
FAILED=1
fi
done
if [ "$FAILED" = "1" ]; then
exit 1
fi

verify-installers:
name: Verify Package Installers
needs: publish-fury
needs: [publish-fury, resolve-tag]
uses: ./.github/workflows/verify-installers.yaml
with:
release_tag: ${{ needs.resolve-tag.outputs.tag }}
secrets: inherit

# Downstream triggers — dispatch and wait for completion
trigger-types:
name: Trigger Types
needs: resolve-tag
if: github.repository == 'burnt-labs/xion'
runs-on: ubuntu-latest
steps:
- name: Trigger and wait for xion-types release
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
TAG_NAME: ${{ needs.resolve-tag.outputs.tag }}
run: |
REPO=burnt-labs/xion-types
gh workflow run release.yaml --repo "$REPO" -f "release_tag=${TAG_NAME}"
sleep 5
RUN_ID=$(gh run list --repo "$REPO" --workflow release.yaml --limit 1 --json databaseId --jq '.[0].databaseId')
echo "::notice::Downstream run: https://github.com/${REPO}/actions/runs/${RUN_ID}"
if ! gh run watch "$RUN_ID" --repo "$REPO" --exit-status; then
echo "::group::Downstream logs"
gh run view "$RUN_ID" --repo "$REPO" --log-failed 2>/dev/null || gh run view "$RUN_ID" --repo "$REPO" --log
echo "::endgroup::"
exit 1
fi

update-chain-registry:
name: Update Chain Registry
needs: resolve-tag
if: github.repository == 'burnt-labs/xion'
runs-on: ubuntu-latest
steps:
- name: Dispatch and wait for xion-assets update
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
TAG_NAME: ${{ needs.resolve-tag.outputs.tag }}
run: |
REPO=burnt-labs/xion-assets
EVENT_TYPE=$( [[ "$TAG_NAME" == *-rc* ]] && echo "xion-assets-testnet-release-trigger" || echo "xion-assets-mainnet-release-trigger" )
WORKFLOW=$( [[ "$TAG_NAME" == *-rc* ]] && echo "update-testnet-chain-registry.yaml" || echo "update-mainnet-chain-registry.yaml" )
gh api "repos/${REPO}/dispatches" \
-f "event_type=${EVENT_TYPE}" \
-f "client_payload[tag_name]=${TAG_NAME}"
sleep 5
RUN_ID=$(gh run list --repo "$REPO" --workflow "$WORKFLOW" --limit 1 --json databaseId --jq '.[0].databaseId')
echo "::notice::Downstream run: https://github.com/${REPO}/actions/runs/${RUN_ID}"
if ! gh run watch "$RUN_ID" --repo "$REPO" --exit-status; then
echo "::group::Downstream logs"
gh run view "$RUN_ID" --repo "$REPO" --log-failed 2>/dev/null || gh run view "$RUN_ID" --repo "$REPO" --log
echo "::endgroup::"
exit 1
fi

upgrade-network:
name: Network Upgrade PR
needs: resolve-tag
if: github.repository == 'burnt-labs/xion'
runs-on: ubuntu-latest
steps:
- name: Trigger and wait for upgrade workflow
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
TAG_NAME: ${{ needs.resolve-tag.outputs.tag }}
IS_RC: ${{ needs.resolve-tag.outputs.is_rc }}
run: |
if [ "$IS_RC" = "true" ]; then
REPO="burnt-labs/xion-testnet-2"
else
REPO="burnt-labs/xion-mainnet-1"
fi
gh workflow run create-release.yml --repo "$REPO" -f "release_tag=${TAG_NAME}"
sleep 5
RUN_ID=$(gh run list --repo "$REPO" --workflow create-release.yml --limit 1 --json databaseId --jq '.[0].databaseId')
echo "::notice::Downstream run: https://github.com/${REPO}/actions/runs/${RUN_ID}"
if ! gh run watch "$RUN_ID" --repo "$REPO" --exit-status; then
echo "::group::Downstream logs"
gh run view "$RUN_ID" --repo "$REPO" --log-failed 2>/dev/null || gh run view "$RUN_ID" --repo "$REPO" --log
echo "::endgroup::"
exit 1
fi
41 changes: 0 additions & 41 deletions .github/workflows/release-downstream.yaml

This file was deleted.

18 changes: 15 additions & 3 deletions .github/workflows/verify-installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ name: Verify Installers
# reusable workflow, do not add triggers
on:
workflow_call:
inputs:
release_tag:
required: false
type: string
workflow_dispatch:
inputs:
release_tag:
description: "Release tag (e.g. v29.0.1). Defaults to github.ref_name."
required: false
type: string

jobs:
apt-install:
Expand Down Expand Up @@ -32,7 +41,8 @@ jobs:
- name: Install xiond
run: |
# Convert version: strip 'v' prefix, convert '-rc' to '~rc' for deb
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//' | sed 's/-rc/~rc/')
TAG="${{ inputs.release_tag || github.ref_name }}"
VERSION=$(echo "$TAG" | sed 's/^v//' | sed 's/-rc/~rc/')
sudo apt install -y xiond=${VERSION}

- name: Verify xiond installation
Expand Down Expand Up @@ -64,7 +74,8 @@ jobs:
- name: Install xiond
run: |
# Convert version: strip 'v' prefix, convert '-rc' to '~rc', append '-1' for rpm
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//' | sed 's/-rc/~rc/')
TAG="${{ inputs.release_tag || github.ref_name }}"
VERSION=$(echo "$TAG" | sed 's/^v//' | sed 's/-rc/~rc/')
yum install xiond-${VERSION}-1 -y

- name: Verify xiond installation
Expand Down Expand Up @@ -96,7 +107,8 @@ jobs:
- name: Install xiond
run: |
# Convert version: strip 'v' prefix, convert '-rc' to '_rc' for alpine
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//' | sed 's/-rc/_rc/')
TAG="${{ inputs.release_tag || github.ref_name }}"
VERSION=$(echo "$TAG" | sed 's/^v//' | sed 's/-rc/_rc/')
apk update && apk add xiond=${VERSION}

- name: Verify xiond installation
Expand Down
18 changes: 8 additions & 10 deletions .goreleaser/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,30 @@ checksum:
# cmd: gpg2
# #- args: ["-u", "<key id, fingerprint, email, ...>", "--output", "${signature}", "--detach-sign", "${artifact}"]

# docs https://goreleaser.com/customization/fury/
furies:
- account: burnt
disable: "{{ .IsSnapshot }}"
# Fury uploads handled by workflow step for better error handling
# furies:
# - account: burnt
# disable: "{{ .IsSnapshot }}"

# Docs: https://goreleaser.com/customization/homebrew/
brews:
homebrew_casks:
- name: xiond
alternative_names:
- "xiond@{{ .Version }}"
- "xiond@{{ .Major }}"
ids:
- tgz
test: |
system "#{bin}/xiond version"
url:
template: "https://github.com/{{ .Env.RELEASE_OWNER }}/{{ .Env.RELEASE_REPO }}/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
signing:
enabled: true
key: "{{ .Env.GPG_FINGERPRINT }}"
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
directory: Formula
commit_msg_template: "Brew cask update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://xion.burnt.com/"
description: "Xiond is the Cosmos SDK based blockchain cli/daemon for the Xion Network."
license: "Apache-2.0"
skip_upload: auto
repository:
owner: burnt-labs
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ make proto-gen # Regenerate protobuf types
Releasing is triggered by **manually running** `create-release.yaml` via `workflow_dispatch`, or by **pushing a tag** matching `v[0-9]+\.[0-9]+\.[0-9]+` (stable) or `v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+` (release candidate).

1. **`create-release.yaml`** — Triggered on tag push. Kicks off the full build pipeline.
2. **`publish-release.yaml`** — Triggered on `release:published`. Runs GoReleaser (Fury packages, homebrew).
3. **`release-downstream.yaml`** — Triggered on `release:published`. Calls downstream repos:
2. **`publish-release.yaml`** — Triggered on `release:published`. Runs GoReleaser (Fury packages, homebrew) and triggers downstream repos:
- → **`burnt-labs/xion-types`** `release.yaml` — regenerates protobuf types for all languages
- → **`burnt-labs/xion-assets`** `update_chain_registry.yaml` — updates chain registry versions
- → **`burnt-labs/xion-assets`** — updates chain registry versions (via `repository_dispatch`)
- → **`burnt-labs/xion-testnet-2`** `create-release.yml` — creates upgrade PR (**rc releases only**)
- → **`burnt-labs/xion-mainnet-1`** `create-release.yml` — creates upgrade PR (**stable releases only**)

Expand Down
Loading