bump_version #26
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: bump_version | |
on: | |
workflow_dispatch: | |
inputs: | |
release_kind: | |
description: 'Kind of version bump' | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
required: true | |
jobs: | |
bump: | |
name: bump version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Install cargo-edit | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-edit | |
- name: Bump version of proxydetox | |
run: | | |
cargo set-version --bump ${{ github.event.inputs.release_kind }} | |
- name: Cargo update | |
run: | | |
./tools/repin | |
- name: Get new version | |
id: new_version | |
run: | | |
./tools/version | |
- name: Create PR | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Version ${{ steps.new_version.outputs.version }}" | |
git tag "v${{ steps.new_version.outputs.version }}" | |
git push | |
git push --tags |