spotify-dl/.github/workflows/create-release.yml
2024-05-17 18:10:22 +02:00

41 lines
1.2 KiB
YAML

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
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Bump version
id: cargo-bump
run:
cargo install cargo-bump --force
cargo bump ${{ github.event.inputs.release_type }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Bump version to v${{ steps.cargo-bump.outputs.new_version }}"
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:
tag: v${{ steps.cargo-bump.outputs.new_version }}
message: "Bump version to v${{ steps.cargo-bump.outputs.new_version }}"