pingrep 25.3.0

A command-line tool to quickly and easily search through your Pinboard bookmarks locally
Documentation
name: Version bumps

'on':
  workflow_dispatch:
  push:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

jobs:
  version-bump:
    name: Create release tag/version-bump PR
    runs-on: ubuntu-latest
    env:
      # We need to associate the workflow with a regular user, not the
      # github-actions bot, to ensure other workflows run in response to the PR
      # this creates. For more information, see:
      # https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
      GITHUB_TOKEN: ${{ secrets.NLXRBOT_TOKEN }}
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4
        with:
          fetch-depth: 50
          fetch-tags: true
      - uses: cargo-bins/cargo-binstall@main
      - name: Install dependencies
        run: |
          cargo binstall -y just
          cargo binstall -y cargo-release
      - name: Create release tag/version-bump PR
        run: |
          set -x
          git config user.name nlxrbot
          git config user.email nlxrbot@nick.groenen.me

          PATTERN="^Release pingrep v.+"
          COMMIT_TITLE=$(git show --no-patch --format=%s HEAD)
          if [[ $COMMIT_TITLE =~ $PATTERN ]]; then
            # If this was a release commit, tag it so that the release workflow
            # (from release.yml) kicks off.
            just create-release-tag
          else
            # Otherwise prepare/update a version-bump PR for this commit.
            just bump-version
            just create-release-pr
          fi