Bump Version #3
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
# .github/workflows/release.yml | |
name: Bump version | |
on: | |
workflow_dispatch: | |
inputs: | |
bump: | |
description: 'Increment manifest version' | |
required: true | |
type: choice | |
options: [major, minor, patch, rc, beta, alpha] | |
default: 'minor' | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Install just | |
uses: extractions/setup-just@v2 | |
- name: Install cross | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cross | |
- name: Install cargo-edit | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-edit | |
- name: Install patch-crate | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: patch-crate | |
- name: Bump version ${{ github.event.inputs.bump }} | |
run: just bump ${{ github.event.inputs.bump }} | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -a -m "🔖 Bump version number to $(just version)" | |
git tag -a $(just version) -m "" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true |