Skip to content

Commit 28e3df8

Browse files
committed
GitOps
1 parent 8d817a5 commit 28e3df8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.GH_TOKEN }}
1719

1820
- name: Set up Python
1921
uses: actions/setup-python@v4
@@ -25,6 +27,20 @@ jobs:
2527
pip install uv
2628
make install
2729
30+
- name: Update version in pyproject.toml
31+
id: update_version
32+
run: |
33+
TAG_NAME=${GITHUB_REF#refs/tags/}
34+
sed -i "s/^version = \".*\"/version = \"${TAG_NAME#v}\"/" pyproject.toml
35+
36+
- name: Commit version update
37+
run: |
38+
git config --global user.name "github-actions[bot]"
39+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
40+
git add pyproject.toml
41+
git commit -m "Update version to ${GITHUB_REF#refs/tags/}"
42+
git push origin HEAD:${GITHUB_REF#refs/tags/} --force
43+
2844
- name: Build package
2945
run: make build
3046

0 commit comments

Comments
 (0)