Rust Release #8
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: Rust Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version_level: | |
type: choice | |
description: Version Level | |
options: | |
- prerelease | |
- patch | |
- minor | |
- major | |
secrets: | |
CRATES_IO_TOKEN: | |
required: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: fregante/setup-git-user@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target | |
key: ${{ runner.os }}-cargo | |
restore-keys: ${{ runner.os }}-cargo | |
- name: Install workspaces | |
run : cargo install cargo-workspaces | |
- name: Login | |
run: echo ${{secrets.CRATES_IO_TOKEN}} | |
- name: Publish | |
run: cargo workspaces -y ${{ github.event.inputs.version_level }} |