Skip to content

Merge branch 'v1_12_0-upgrade' into 'main' #193

Merge branch 'v1_12_0-upgrade' into 'main'

Merge branch 'v1_12_0-upgrade' into 'main' #193

Workflow file for this run

name: binaries
on:
workflow_dispatch:
push:
branches:
tags:
env:
go_version: 1.22.12
jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- name: Set release variables
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
RELEASE_TAG="${{ github.ref_name }}"
else
RELEASE_TAG="dev"
fi
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=go-flare-${RELEASE_TAG}-linux-amd64.zip" >> $GITHUB_ENV
- run: sudo apt-get update -y && sudo apt-get install -y rsync
- name: build
id: build
env:
GOPATH: ${{ github.workspace }}/go
run: |
cd avalanchego
./scripts/build.sh
- name: Package build for release
if: github.ref_type == 'tag'
run: |
cd avalanchego/build
zip -r ../../${{ env.ARTIFACT_NAME }} .
- name: Install Cosign
if: github.ref_type == 'tag'
uses: sigstore/cosign-installer@v3.8.1
- name: Sign release binary
if: github.ref_type == 'tag'
shell: bash
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign-blob --yes \
--output-signature ${{ env.ARTIFACT_NAME }}.sig \
--output-certificate ${{ env.ARTIFACT_NAME }}.pem \
${{ env.ARTIFACT_NAME }}
- name: Verify release binary signature
if: github.ref_type == 'tag'
shell: bash
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign verify-blob \
--certificate ${{ env.ARTIFACT_NAME }}.pem \
--certificate-identity=https://github.com/${{ github.repository }}/.github/workflows/build-binary.yaml@${{ github.ref }} \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--signature ${{ env.ARTIFACT_NAME }}.sig \
${{ env.ARTIFACT_NAME }}
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
body: "TODO"
files: ${{ env.ARTIFACT_NAME }}*
- name: Archive production artifacts
if: github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: dist-bin
path: |
${{ env.ARTIFACT_NAME }}