File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,18 @@ jobs:
63
63
git tag -v "$TAG_NAME"
64
64
65
65
# verify version
66
- just validate_version $TAG_NAME
66
+ RELEASE_VERSION=$( just validate_version $TAG_NAME)
67
67
68
68
# check that github has marked the tag as verified
69
- export TAG_URL=` curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository_owner }}/${{ github.repository }}/git/refs/tags/$TAG_NAME | jq -r ".object.url"`
69
+ export TAG_URL=$( curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository_owner }}/${{ github.repository }}/git/refs/tags/$TAG_NAME | jq -r ".object.url")
70
70
result=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$TAG_URL" | jq -r ".verification.verified")
71
71
if [ "$result" != "true" ]; then
72
72
echo "Error: Tag verification failed." >&2
73
73
exit 1
74
74
fi
75
75
76
76
# export the release version
77
- echo "RELEASE_VERSION=${TAG_NAME }" >> $GITHUB_ENV
77
+ echo "RELEASE_VERSION=${RELEASE_VERSION }" >> $GITHUB_ENV
78
78
- name : Build the binary wheel and a source tarball
79
79
run : just build
80
80
- name : Store the distribution packages
Original file line number Diff line number Diff line change @@ -212,9 +212,10 @@ validate_version VERSION:
212
212
import re
213
213
import tomllib
214
214
import django_enum
215
- assert re.match(r" \d +[.]\d +[.]\w +" , " {{ VERSION }} " )
216
- assert " {{ VERSION }} " == tomllib.load(open(' pyproject.toml' , ' rb' ))[' project' ][' version' ]
217
- assert " {{ VERSION }} " == django_enum.__version__
215
+ version = re.match(r" v?(\d +[.]\d +[.]\w +)" , " {{ VERSION }} " ).groups()[0]
216
+ assert version == tomllib.load(open(' pyproject.toml' , ' rb' ))[' project' ][' version' ]
217
+ assert version == django_enum.__version__
218
+ print(version)
218
219
219
220
# issue a relase for the given semver string (e.g. 2.1.0)
220
221
release VERSION :
You can’t perform that action at this time.
0 commit comments