Skip to content

Commit 057c910

Browse files
committed
Add release workflow
1 parent a968c26 commit 057c910

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
release:
10+
if: >
11+
github.event.pull_request.merged == true &&
12+
contains(github.event.pull_request.labels.*.name, 'bump:patch')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Repository
17+
- name: Checkout the code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # BumpVer needs tags
21+
22+
# Environment
23+
- name: Set up Pixi
24+
uses: prefix-dev/setup-pixi@v0.8.9
25+
26+
- name: Set Git identity
27+
run: |
28+
git config user.name 'github-actions[bot]'
29+
git config user.email 'github-actions[bot]@users.noreply.github.com'
30+
31+
- name: Bump version
32+
run: |
33+
pixi run bumpver update --patch
34+
35+
- name: Create Release
36+
uses: actions/create-release@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
tag_name: ${{ github.ref_name }}
41+
release_name: "Release ${{ github.ref_name }}"

0 commit comments

Comments
 (0)