Release Commit #1
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
# Create a new commit | |
# This action bumps the Cargo.toml version and updates related files. | |
# Updates will affect the following files: | |
# - ./Cargo.toml | |
# - ./Cargo.lock | |
# - ./THIRD-PARTY-LICENSES.md | |
# - ./CHANGELOG.md | |
name: "Release Commit" | |
on: | |
workflow_dispatch: | |
inputs: | |
bump_level: | |
description: "What type of release is this?" | |
required: true | |
type: choice | |
options: | |
- minor | |
- patch | |
permissions: | |
contents: write | |
jobs: | |
setup-environment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Add git tag to release | |
run: ./scripts/create_release_changes ${{ github.event.inputs.text_input }} | |
- name: Get new cargo version | |
id: cargo_version | |
run: | | |
VERSION=$(cargo read-manifest | jq -r ".version") | |
echo "value=v$VERSION" >> $GITHUB_OUTPUT | |
- name: Ensure this release doesn't already exist | |
run: | | |
if git log --grep="Release ${{ steps.cargo_version.outputs.value }}" --quiet; then | |
echo "Release commit already exists: \"Release ${{ steps.cargo_version.outputs.value}}\"" | |
exit 1 | |
fi | |
- name: Commit the changes | |
uses: stefanzweifel/git-auto-commit-action@ac8823709a85c7ce090849ac3e5fe24d006f6e18 # v5.0.1 | |
with: | |
commit_message: "Release ${{ steps.cargo_version.outputs.value }}" | |
branch: ${{ github.head_ref }} | |
commit_user_name: tinted-theming-bot | |
commit_user_email: tintedtheming@proton.me | |
commit_author: tinted-theming-bot <tintedtheming@proton.me> |