Skip to content

[gh-actions](deps): Bump actions/setup-python from 4 to 5 #23

[gh-actions](deps): Bump actions/setup-python from 4 to 5

[gh-actions](deps): Bump actions/setup-python from 4 to 5 #23

Workflow file for this run

name: Auto-release on PR merge
on:
# This action should be run in workflows triggered by `pull_request_target`
# (not by regular `pull_request`!)
pull_request_target:
branches:
# Create a release whenever a PR is merged into one of these branches:
- master
#- maint
types:
- closed
jobs:
release:
runs-on: ubuntu-latest
# Only run for merged PRs with the "release" label:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
# Check out all history so that the previous release tag can be
# found:
fetch-depth: 0
- name: Prepare release
id: new-version
uses: ./release
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update major version branch
run: |
set -ex
v="${new_tag%%.*}"
git update-ref refs/heads/"$v" HEAD
git push origin "$v"
env:
new_tag: ${{ steps.new-version.outputs.new-tag }}