File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -45,25 +45,25 @@ jobs:
45
45
VERSION=${BRANCH_NAME#hotfix/}
46
46
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
47
47
48
- - name : Set tag for setuptools-scm
49
- if : github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
50
- run : git tag v${RELEASE_VERSION} main
51
-
52
48
- name : Build wheel
53
49
run : |
50
+ if ! git rev-parse v${RELEASE_VERSION} > /dev/null 2>&1; then
51
+ _added_tag=1
52
+ git tag v${RELEASE_VERSION} main
53
+ fi
54
+
54
55
python -m pip install build wheel
55
56
python -m build --wheel --sdist
56
57
58
+ if [ ${_added_tag:-0} -eq 1 ]; then
59
+ git tag -d v${RELEASE_VERSION}
60
+ fi
61
+
57
62
- name : Check metadata
58
63
run : |
59
64
python3 -m pip install twine --prefer-binary
60
65
python3 -m twine check dist/*
61
66
62
- - name : Delete local tag used by setuptools-scm
63
- if : github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
64
- run : git -d tag v${RELEASE_VERSION}
65
-
66
-
67
67
# Code below inspired from this action:
68
68
# - uses: taiki-e/create-gh-release-action@v1
69
69
# with:
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Updated
11
+
12
+ - Update GitHub release publishing workflow
13
+
10
14
## [ 1.4.1] - 2022-05-04
11
15
12
16
### Fixed
You can’t perform that action at this time.
0 commit comments