Skip to content

Commit fa09cd6

Browse files
committed
Merge branch 'master' into py-typed
2 parents ee86c84 + 4a69e22 commit fa09cd6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/publish.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v3
2121
with:
22-
ref: master
22+
fetch-depth: 0
23+
- name: Set env
24+
run: |
25+
echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26+
echo "BRANCH=$(git branch -r --contains ${GITHUB_REF} | grep -v HEAD | sed -n 's/ *origin\/\(.*\)/\1/p')" >> $GITHUB_ENV
2327
- name: Set up Python
2428
uses: actions/setup-python@v4
2529
with:
@@ -30,7 +34,7 @@ jobs:
3034
pip install setuptools wheel twine
3135
- name: get infos from Tag
3236
run: |
33-
if [[ $GITHUB_REF =~ (([0-9]+)\.([0-9]+)\.([0-9]+))([-./]dev([0-9]+))? ]]
37+
if [[ $RELEASE_TAG =~ (([0-9]+)\.([0-9]+)\.([0-9]+))([-./]dev([0-9]+))? ]]
3438
then
3539
echo "VERSION=${BASH_REMATCH[0]}" >> $GITHUB_ENV
3640
echo "VERSION_MAJOR=${BASH_REMATCH[2]}" >> $GITHUB_ENV
@@ -72,4 +76,6 @@ jobs:
7276
- name: commit new version-number
7377
uses: stefanzweifel/git-auto-commit-action@v4
7478
with:
79+
branch: ${{ env.BRANCH }}
80+
create_branch: true
7581
commit_message: "increment version after release"

0 commit comments

Comments
 (0)