Skip to content

Commit 9430a1a

Browse files
Create version.yaml
1 parent 294154b commit 9430a1a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/version.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Bump
2+
3+
on:
4+
create:
5+
branches:
6+
- release/*
7+
workflow_dispatch:
8+
9+
jobs:
10+
bump-and-pr:
11+
name: Version Bump
12+
runs-on: ubuntu-latest
13+
if: ${{ contains(github.ref, 'release/') }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
- name: Install poetry
18+
run: pip install poetry
19+
- name: Bump version
20+
# TODO(masanori): Use uv to bump version
21+
run: echo "PR_TITLE=$(git branch --show-current | sed 's|release/||' | xargs poetry version)" >> "$GITHUB_OUTPUT"
22+
id: bump
23+
- name: Bump qfeval_data.__version__
24+
run: git branch --show-current | sed 's|release/||' | xargs -I {} echo '__version__ = "{}"' > qfeval_data/version.py
25+
- name: Create pull request
26+
uses: peter-evans/create-pull-request@v3
27+
with:
28+
author: GitHub Actions <action@github.com>
29+
commit-message: ${{ steps.bump.outputs.PR_TITLE }}
30+
delete-branch: true
31+
branch-suffix: short-commit-hash
32+
title: ${{ steps.bump.outputs.PR_TITLE }}

0 commit comments

Comments
 (0)