Skip to content

chore: release v1.1.0 #9

chore: release v1.1.0

chore: release v1.1.0 #9

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: Create Release and Publish
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf, wasm32-unknown-unknown
components: rustfmt, clippy
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Run comprehensive checks
run: make check
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Extract release notes
id: release_notes
run: |
VERSION="${{ steps.get_version.outputs.VERSION }}"
# Try to use detailed release notes from docs/releases/
RELEASE_FILE="docs/releases/${VERSION}.md"
if [ -f "$RELEASE_FILE" ]; then
cp "$RELEASE_FILE" release_notes.md
else
# Fallback: extract from CHANGELOG.md
awk "/^## \[${VERSION#v}\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md > release_notes.md
if [ ! -s release_notes.md ]; then
echo "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details." > release_notes.md
fi
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
body_path: release_notes.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publishing to crates.io is done manually to handle version-specific logic
# Run `make publish` locally after verifying the release
# - name: Publish to crates.io
# run: make publish
# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}