release #2
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
bump: | |
description: Type of version bump | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
- release | |
- rc | |
- beta | |
- alpha | |
required: true | |
default: patch | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
version: | |
name: Increment version | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Versioneer" | |
- name: Retrieve MSRV from workspace Cargo.toml | |
id: rust_version | |
uses: SebRollen/[email protected] | |
with: | |
file: Cargo.toml | |
field: "workspace.package.rust-version" | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Enable cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-release | |
run: cargo install --version 0.24.4 cargo-release | |
- name: Increment version and tag | |
run: cargo release ${{ inputs.bump }} --no-publish --no-push --no-tag -vv --no-confirm --execute | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: ${{ inputs.bump }} version bump | |
delete-branch: true | |
title: ${{ inputs.bump }} version bump | |
body: ${{ inputs.bump }} version bump | |
token: ${{ secrets.ACTIONS_PAT }} |