Bump the github-actions group across 1 directory with 2 updates #19
Workflow file for this run
This file contains hidden or 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: Create tags from pre-release PRs | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| jobs: | |
| create_tag: | |
| # Only run when the PR was merged and its title starts with "Release " | |
| if: > | |
| github.event.pull_request.merged == true && | |
| startsWith(github.event.pull_request.title, 'Release ') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout full history | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git author | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Read version from pyproject.toml | |
| id: get_version | |
| run: | | |
| version=$(grep -Po '(?<=^version = ")[^"]+' pyproject.toml) | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| - name: Create & push Git tag | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: v${{ steps.get_version.outputs.version }} | |
| run: | | |
| git tag $TAG | |
| git push origin $TAG |