Skip to content

Rust Release

Rust Release #9

Workflow file for this run

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
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: cargo login $CRATES_IO_TOKEN
- name: Publish
run: cargo workspaces -y ${{ github.event.inputs.version_level }}