Skip to content

chore: bump version to 2.5.6 #71

chore: bump version to 2.5.6

chore: bump version to 2.5.6 #71

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Get version from tag
id: tag_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Check Cargo.toml version
run: |
VERSION="${{ env.VERSION }}"
CRATES=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name' | sort)
echo "Workspace crates:"
echo "$CRATES"
echo ""
# Verify all crates match the tag version
MISMATCH=0
for crate in $CRATES; do
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"$crate\") | .version")
if [ "$CRATE_VERSION" != "$VERSION" ]; then
echo "ERROR: $crate version ($CRATE_VERSION) does not match tag version ($VERSION)"
MISMATCH=1
fi
done
if [ "$MISMATCH" -ne 0 ]; then
exit 1
fi
echo "All crates have version $VERSION"
- name: Generate Changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: --verbose --latest --strip header
env:
OUTPUT: CHANGELOG.md
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.git-cliff.outputs.content }}
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Publish to crates.io
run: just publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Verify all crates published
run: |
CRATES=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name' | sort)
VERSION="${{ env.VERSION }}"
FAILED=0
for crate in $CRATES; do
echo "Checking $crate@$VERSION..."
if ! cargo search "$crate" --limit 1 2>/dev/null | grep -q "$VERSION"; then
echo "WARNING: $crate@$VERSION may not have been published"
FAILED=1
fi
done
if [ "$FAILED" -ne 0 ]; then
echo "Some crates may not have been published. Check the publish step output."
fi