Skip to content

Update release workflow #9

Update release workflow

Update release workflow #9

Workflow file for this run

name: release
on:
pull_request_target:
types: [closed]
permissions:
contents: write
jobs:
release:
if: >
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'bump:patch')
runs-on: ubuntu-latest
steps:
# 1. Check out the base branch to ensure we have the merged code
- name: Checkout merged code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 0
# 2. Set up Pixi environment
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.8.9
# 3. Configure Git identity for committing
- name: Set Git identity
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
# 4. Bump the version
- name: Bump version (patch)
run: |
pixi run bumpver update --patch
# 5. Extract version
- name: Get version tag
id: version
run: |
tag=$(pixi run current-version)
echo "tag=${tag}" >> $GITHUB_OUTPUT
# 6. Create GitHub Release
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}