Skip to content

chore(release): bump version to 0.11.1 #18

chore(release): bump version to 0.11.1

chore(release): bump version to 0.11.1 #18

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build-release:
name: Build Release Binary
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: ccboard
asset_name: ccboard-linux-x86_64
# ARM64 Linux temporarily disabled - cross-compilation issues
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# artifact_name: ccboard
# asset_name: ccboard-linux-aarch64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: ccboard
asset_name: ccboard-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: ccboard
asset_name: ccboard-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: ccboard.exe
asset_name: ccboard-windows-x86_64.exe
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- name: Install trunk
uses: jetli/trunk-action@v0.5.0
with:
version: "latest"
- name: Build WASM frontend
working-directory: crates/ccboard-web
run: trunk build --release
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }} --bin ccboard
- name: Strip binary (Linux/macOS)
if: runner.os != 'Windows'
run: strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- name: Compress binary (Linux/macOS)
if: runner.os != 'Windows'
run: |
cd target/${{ matrix.target }}/release
tar czf ${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
mv ${{ matrix.asset_name }}.tar.gz ../../..
- name: Compress binary (Windows)
if: runner.os == 'Windows'
run: |
cd target/${{ matrix.target }}/release
7z a ${{ matrix.asset_name }}.zip ${{ matrix.artifact_name }}
move ${{ matrix.asset_name }}.zip ../../..
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: |
${{ matrix.asset_name }}.tar.gz
${{ matrix.asset_name }}.zip
if-no-files-found: ignore
create-release:
name: Create GitHub Release
needs: build-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Move artifacts to root
run: |
mkdir -p release-assets
find artifacts -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec mv {} release-assets/ \;
ls -lah release-assets/
- name: Get version from tag
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Generate changelog
id: changelog
run: |
VERSION="${{ steps.get_version.outputs.version }}"
echo "Generating changelog for version $VERSION"
# Extract changelog from CHANGELOG.md or use git log
if grep -q "## \[${VERSION}\]" CHANGELOG.md 2>/dev/null; then
sed -n "/## \[${VERSION}\]/,/## \[/p" CHANGELOG.md | sed '$ d' > changelog.txt
else
echo "## Changes in v$VERSION" > changelog.txt
echo "" >> changelog.txt
git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD >> changelog.txt
fi
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} \
--title "ccboard v${{ steps.get_version.outputs.version }}" \
--notes-file changelog.txt \
release-assets/*
publish-crates:
name: Publish to crates.io
needs: create-release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Publish ccboard-core
run: cargo publish -p ccboard-core --token ${{ secrets.CARGO_TOKEN }}
continue-on-error: true
- name: Wait for crates.io propagation
run: sleep 30
- name: Publish ccboard-tui
run: cargo publish -p ccboard-tui --token ${{ secrets.CARGO_TOKEN }}
continue-on-error: true
- name: Publish ccboard-web
run: cargo publish -p ccboard-web --token ${{ secrets.CARGO_TOKEN }}
continue-on-error: true
- name: Wait for crates.io propagation
run: sleep 30
- name: Publish ccboard
run: cargo publish -p ccboard --token ${{ secrets.CARGO_TOKEN }}