Skip to content

Release Crate

Release Crate #28

Workflow file for this run

name: Release Crate
on:
workflow_dispatch:
inputs:
level:
description: "Release level (patch, minor, major)"
required: true
default: patch
type: choice
options:
- patch
- minor
- major
jobs:
release:
name: Cargo Release
runs-on: ubuntu-latest
permissions:
contents: write # for pushing tags/commits
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 0 # required for tagging and changelog
- name: Setup Git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install cargo-release
run: cargo install cargo-release
- name: Install git-cliff
run: cargo install git-cliff
- name: Run cargo-release
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release ${{ github.event.inputs.level }} --execute --no-confirm