mirror of
https://github.com/obsqrbtz/egui_knob.git
synced 2026-04-08 20:19:17 +03:00
27 lines
698 B
YAML
27 lines
698 B
YAML
name: Publish to crates.io
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Check if version matches tag
|
|
run: |
|
|
TAG=${GITHUB_REF#refs/tags/v}
|
|
CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d'"' -f2)
|
|
if [ "$TAG" != "$CARGO_VERSION" ]; then
|
|
echo "Tag version ($TAG) doesn't match Cargo.toml version ($CARGO_VERSION)"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Publish to crates.io
|
|
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} |