Skip to content

chore: bump version to 0.2.4 #10

chore: bump version to 0.2.4

chore: bump version to 0.2.4 #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
- '*.*.*'
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: linux-amd64
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
name: linux-arm64
- target: x86_64-apple-darwin
os: macos-latest
name: darwin-amd64
- target: aarch64-apple-darwin
os: macos-latest
name: darwin-arm64
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools (Linux ARM64)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build
run: |
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
fi
cargo build --release --target ${{ matrix.target }}
- name: Package binary
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/tgcli dist/tgcli-${{ matrix.name }}
chmod +x dist/tgcli-${{ matrix.name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tgcli-${{ matrix.name }}
path: dist/tgcli-${{ matrix.name }}
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Prepare release assets
run: |
mkdir -p release
for dir in artifacts/tgcli-*; do
name=$(basename "$dir")
cp "$dir"/* "release/"
done
ls -la release/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: release/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}