tinty 0.26.1

Change the theme of your terminal, text editor and anything else with one command!
# 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:
          fetch-depth: 0 # Needed to ensure previous Release commits don't exist with `git log`
          token: ${{ secrets.BOT_ACCESS_TOKEN }}

      - uses: actions-rust-lang/setup-rust-toolchain@v1

      - name: Install cargo about and cargo deny for create_release_changes script
        run: |
          cargo install --locked cargo-about
          cargo install --locked cargo-deny

      - name: Add git tag to release
        run: ./scripts/create_release_changes "${{ github.event.inputs.bump_level }}"

      - 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 [[ -n $(git log --grep="Release ${{ steps.cargo_version.outputs.value }}") ]]; then
            echo "Release commit already exists: \"Release ${{ steps.cargo_version.outputs.value}}\""
            exit 1
          else
            echo "No matching release commit found, proceeding..."
          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>