File tree Expand file tree Collapse file tree 2 files changed +47
-47
lines changed
Expand file tree Collapse file tree 2 files changed +47
-47
lines changed Original file line number Diff line number Diff line change 1+ name : bump
2+
3+ on :
4+ pull_request_target :
5+ types :
6+ - closed
7+
8+ permissions :
9+ contents : write # needed for pushing tags/commits
10+
11+ jobs :
12+ bump :
13+ # Only run if PR was merged AND has the bump label
14+ if : >
15+ github.event.pull_request.merged == true &&
16+ contains(github.event.pull_request.labels.*.name, 'bump:patch')
17+
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ # We check out the BASE branch — this is now the merged code — SAFE
22+ - name : Checkout merged code
23+ uses : actions/checkout@v4
24+ with :
25+ ref : ${{ github.event.pull_request.base.ref }}
26+ fetch-depth : 0
27+
28+ # Environment
29+ - name : Set up Pixi
30+ uses : prefix-dev/setup-pixi@v0.8.9
31+
32+ # Git identity
33+ - name : Set Git identity
34+ run : |
35+ git config user.name 'github-actions[bot]'
36+ git config user.email 'github-actions[bot]@users.noreply.github.com'
37+
38+ # Bump version
39+ - name : Bump version (patch)
40+ run : |
41+ pixi run bumpver update --patch
Original file line number Diff line number Diff line change 11name : release
22
3- on :
4- pull_request_target :
5- types :
6- - closed
7-
8- permissions :
9- contents : write # needed for pushing tags/commits & creating releases
3+ on : push
104
115jobs :
126 release :
13- # Only run if PR was merged AND has the bump label
14- if : >
15- github.event.pull_request.merged == true &&
16- contains(github.event.pull_request.labels.*.name, 'bump:patch')
17-
187 runs-on : ubuntu-latest
19-
208 steps :
21- # We check out the BASE branch — this is now the merged code — SAFE
22- - name : Checkout merged code
23- uses : actions/checkout@v4
24- with :
25- ref : ${{ github.event.pull_request.base.ref }}
26- fetch-depth : 0
27-
28- # Environment
29- - name : Set up Pixi
30- uses : prefix-dev/setup-pixi@v0.8.9
31-
32- # Git identity
33- - name : Set Git identity
34- run : |
35- git config user.name 'github-actions[bot]'
36- git config user.email 'github-actions[bot]@users.noreply.github.com'
37-
38- # Bump version
39- - name : Bump version (patch)
40- run : |
41- pixi run bumpver update --patch
42-
43- - name : Get version tag
44- id : version
45- run : echo "value=$(pixi run current-version)" >> $GITHUB_OUTPUT
46-
47- # Create GitHub Release
48- - name : Create Release
49- uses : actions/create-release@v1
50- env :
51- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52- with :
53- tag_name : ${{ steps.version.outputs.value }}
54- release_name : " Release ${{ steps.version.outputs.value }}"
9+ - name : Checkout
10+ uses : actions/checkout@v5
11+ - name : Release
12+ uses : softprops/action-gh-release@v2
13+ if : github.ref_type == 'tag'
You can’t perform that action at this time.
0 commit comments