teatui/.github/workflows/release.yml
2025-08-19 23:24:13 +02:00

32 lines
963 B
YAML

name: Publish to crates.io
on:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
jobs:
publish-crate:
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
with:
toolchain: stable
- name: Set up Git
run: |
git config --global user.email "49537445+JasterV@users.noreply.github.com"
git config --global user.name "JasterV"
- name: Install cargo-edit
run: |
cargo install cargo-edit
- name: Update crate version
id: update-version
run: |
cargo set-version -p teatui $GITHUB_REF_NAME
- name: Publish crate
run: |
# Publish the crate using the updated version from the previous step
cargo publish -p teatui --token ${{ secrets.CRATES_IO_TOKEN }}