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@v5 - 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 --allow-dirty --token ${{ secrets.CRATES_IO_TOKEN }}