@@ -2,53 +2,50 @@ name: release
22
33on :
44 pull_request_target :
5- types :
6- - closed
5+ types : [closed]
76
87permissions :
9- contents : write # needed for pushing tags/commits & creating releases
8+ contents : write
109
1110jobs :
1211 release :
13- # Only run if PR was merged AND has the bump label
1412 if : >
1513 github.event.pull_request.merged == true &&
1614 contains(github.event.pull_request.labels.*.name, 'bump:patch')
17-
1815 runs-on : ubuntu-latest
1916
2017 steps :
21- # We check out the BASE branch — this is now the merged code — SAFE
18+ # 1. Check out the base branch to ensure we have the merged code
2219 - name : Checkout merged code
2320 uses : actions/checkout@v4
2421 with :
2522 ref : ${{ github.event.pull_request.base.ref }}
2623 fetch-depth : 0
2724
28- # Environment
25+ # 2. Set up Pixi environment
2926 - name : Set up Pixi
3027 uses : prefix-dev/setup-pixi@v0.8.9
3128
32- # Git identity
29+ # 3. Configure Git identity for committing
3330 - name : Set Git identity
3431 run : |
3532 git config user.name 'github-actions[bot]'
3633 git config user.email 'github-actions[bot]@users.noreply.github.com'
3734
38- # Bump version
35+ # 4. Bump the version
3936 - name : Bump version (patch)
4037 run : |
4138 pixi run bumpver update --patch
4239
40+ # 5. Extract version
4341 - name : Get version tag
4442 id : version
45- run : echo "value=$(pixi run current-version)" >> $GITHUB_OUTPUT
43+ run : |
44+ tag=$(pixi run current-version)
45+ echo "tag=${tag}" >> $GITHUB_OUTPUT
4646
47- # Create GitHub Release
48- - name : Create Release
49- uses : actions/create-release@v1
50- env :
51- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ # 6. Create GitHub Release
48+ - name : Create GitHub Release
49+ uses : softprops/action-gh-release@v2
5250 with :
53- tag_name : ${{ steps.version.outputs.value }}
54- release_name : " Release ${{ steps.version.outputs.value }}"
51+ tag_name : ${{ steps.version.outputs.tag }}
0 commit comments