# Publishes the 'oblodai' crate to crates.io on a v* tag.
# Required repo secret: CARGO_REGISTRY_TOKEN (crates.io API token).
name: Release
on:
push:
tags:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish --all-features
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
# Transfer ownership to the org team so the personal account isn't the public owner.
# Best-effort: a hiccup here must not fail an already-successful publish.
- name: Set crate owner to org team
run: |
sleep 15
cargo owner --add github:oblodai:owners oblodai || true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}