Skip to content

Commit a14af06

Browse files
committed
Do not use version.txt
1 parent 64e5438 commit a14af06

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@ jobs:
2727
pip install bump2version
2828
2929
- name: Bump version
30+
id: bump_version
3031
run: |
31-
bump2version patch --allow-dirty --list | grep new_version= | cut -d'=' -f2 > version.txt
32+
VERSION=$(bump2version patch --allow-dirty --list | grep new_version= | cut -d'=' -f2)
33+
echo "VERSION=$VERSION" >> $GITHUB_ENV
3234
shell: bash
3335

34-
- name: Get new version
35-
id: vars
36-
run: |
37-
echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
38-
3936
- name: Commit version bump
4037
uses: stefanzweifel/git-auto-commit-action@v4
4138
with:
@@ -46,7 +43,6 @@ jobs:
4643
your_package/__init__.py # If version is specified here
4744
4845
- name: Create GitHub Release
49-
id: create_release
5046
uses: softprops/action-gh-release@v1
5147
with:
5248
tag_name: "v${{ env.VERSION }}"

0 commit comments

Comments
 (0)