Skip to content

Release Tools

Release Tools #9

Workflow file for this run

name: Release Tools
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
setup-and-lint:
uses: ./.github/workflows/go-setup-lint.yaml
with:
go-version: ${{ vars.GO_VERSION || '1.25.7' }}
golangci-lint-version: ${{ vars.GOLANGCI_VERSION || 'latest' }}
secrets:
git-user: ${{ secrets.GIT_USER }}
git-pass: ${{ secrets.GIT_PASS }}
build:
permissions:
contents: write
needs: [setup-and-lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-15-intel]
include:
- os: ubuntu-latest
name: linux
extension: .tar.gz
- os: macos-15-intel
name: darwin
extension: .tar.gz
- os: macos-latest
name: darwin-arm64
extension: .tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref_name }}
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
steps:
- name: Cleanup bin directory
run: rm -rf bin/*
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Go Setup
uses: ./.github/actions/go-setup-action
with:
go-version: ${{ vars.GO_VERSION || '1.25.7' }}
- name: Build
run: |
make build-operator RELEASE=1
make build-validator RELEASE=1
make build-benchmark RELEASE=1
- name: Create tarball
run: |
cp kvm/wasmer2/libvmexeccapi* bin/
cd bin
LIB_FILE="libvmexeccapi.so"
if [[ "${{ matrix.name }}" == "darwin-arm64" ]]; then
LIB_FILE="libvmexeccapi_arm.dylib"
elif [[ "${{ matrix.name }}" == "darwin" ]]; then
LIB_FILE="libvmexeccapi.dylib"
fi
tar -czf klevergo-operator${{ matrix.extension }} operator $LIB_FILE
tar -czf klevergo-node${{ matrix.extension }} validator $LIB_FILE
tar -czf klevergo-benchmark${{ matrix.extension }} benchmark
# Prepare extension files
mkdir ${{ matrix.name }}
cp $LIB_FILE ${{ matrix.name }}/
cp operator ${{ matrix.name }}/koperator
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
bin/klevergo-node${{ matrix.extension }}
bin/klevergo-operator${{ matrix.extension }}
bin/klevergo-benchmark${{ matrix.extension }}
generate_release_notes: true
draft: true
prerelease: true
- name: List of built files
run: ls -lh bin
- name: List of built extension files
run: ls -lh bin/${{ matrix.name }}
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Configure GCP service account
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CLOUD_RUN_SA }}'
- name: Upload operator files to bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'bin/klevergo-operator${{ matrix.extension }}'
destination: 'kleverchain-public/koperator/${{ matrix.name }}/${{ env.VERSION }}'
predefinedAcl: 'publicRead'
- name: Upload node files to bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'bin/klevergo-node${{ matrix.extension }}'
destination: 'kleverchain-public/knode/${{ matrix.name }}/${{ env.VERSION }}'
predefinedAcl: 'publicRead'
- name: Upload benchmark files to bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'bin/klevergo-benchmark${{ matrix.extension }}'
destination: 'kleverchain-public/kbenchmark/${{ matrix.name }}/${{ env.VERSION }}'
predefinedAcl: 'publicRead'
- name: Upload Klever Blockchain IDE operator files to bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'bin/${{ matrix.name }}'
destination: 'kleverchain-public/koperator/${{ matrix.name }}/${{ env.VERSION }}'
predefinedAcl: 'publicRead'
parent: false