Merge pull request #191 from ngyn-rs/dev #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Workflow | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
rustc_version: | |
description: "Rustc version" | |
required: true | |
default: "1.75.0" | |
jobs: | |
crates_io_publish: | |
name: Publish (crates.io) | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ github.event.inputs.rustc_version }} | |
- name: cargo-release Cache | |
id: cargo_release_cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/bin/cargo-release | |
key: ${{ runner.os }}-cargo-release | |
- run: cargo install cargo-release cargo-expand | |
if: steps.cargo_release_cache.outputs.cache-hit != 'true' | |
- name: cargo login | |
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} | |
- name: "cargo release publish" | |
run: |- | |
cargo release \ | |
publish \ | |
--manifest-path ./crates/Cargo.toml \ | |
--workspace \ | |
--all-features \ | |
--allow-branch main \ | |
--no-confirm \ | |
--no-verify \ | |
--execute |