Skip to content

chore: Bump version

chore: Bump version #3

Workflow file for this run

name: Publish Prerelease
on:
push:
paths:
# Only run if these files are changed
- "**/Cargo.toml"
- "**/*.yml"
- "**/Cargo.lock"
- "**/*.rs"
branches:
- main
jobs:
checks:
uses: ./.github/workflows/checks.yml
publish-crates-io:
name: Publish prerelease to crates.io
runs-on: ubuntu-latest
needs: checks
concurrency:
group: prerelease-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-edit
run: cargo install cargo-edit --locked
- name: Compute prerelease version
id: version
run: |
BASE_VERSION=$(cargo pkgid -p libtortillas | sed 's/.*#//')
PRERELEASE_VERSION="${BASE_VERSION}-alpha.${GITHUB_SHA::7}"
echo "prerelease_version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
- name: Set prerelease version
run: |
cargo set-version -p libtortillas ${{ steps.version.outputs.prerelease_version }}
- name: Verify package (pre-publish)
run: cargo package -p libtortillas --allow-dirty
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p libtortillas --allow-dirty