2024-05-13 23:01:52 +02:00
|
|
|
name: Create Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
release_type:
|
|
|
|
description: 'Type of release to create'
|
|
|
|
required: true
|
|
|
|
default: 'minor'
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- patch
|
|
|
|
- minor
|
|
|
|
- major
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
bump-version:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-05-17 18:10:22 +02:00
|
|
|
- name: install Rust stable
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2024-05-13 23:01:52 +02:00
|
|
|
- name: Bump version
|
2024-05-13 23:24:40 +02:00
|
|
|
id: cargo-bump
|
2024-05-17 18:10:22 +02:00
|
|
|
run:
|
|
|
|
cargo install cargo-bump --force
|
|
|
|
cargo bump ${{ github.event.inputs.release_type }}
|
2024-05-13 23:01:52 +02:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2024-05-13 23:24:40 +02:00
|
|
|
commit_message: "Bump version to v${{ steps.cargo-bump.outputs.new_version }}"
|
2024-05-13 23:01:52 +02:00
|
|
|
commit_user_name: "github-actions[bot]"
|
|
|
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
|
|
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
|
|
|
branch: master
|
|
|
|
- name: Create tag
|
|
|
|
uses: rickstaa/action-create-tag@v1
|
|
|
|
with:
|
2024-05-13 23:24:40 +02:00
|
|
|
tag: v${{ steps.cargo-bump.outputs.new_version }}
|
|
|
|
message: "Bump version to v${{ steps.cargo-bump.outputs.new_version }}"
|