Skip to content

chore: bump version to 0.6.2 #31

chore: bump version to 0.6.2

chore: bump version to 0.6.2 #31

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Verify version matches tag
run: |
CARGO_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
TAG_VERSION=${GITHUB_REF#refs/tags/v}
if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: Cargo.toml has $CARGO_VERSION but tag is v$TAG_VERSION"
exit 1
fi
- name: Run tests
run: cargo test
- name: Check formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy --all-features -- -D warnings
publish:
needs: test
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_TOKEN }}
create-release:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
needs: create-release
strategy:
matrix:
include:
# macOS (Apple Silicon)
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build and upload binary
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tsps # same as package name on Cargo.toml
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}