4848 run : |
4949 uv sync --no-default-groups --group release
5050
51- - name : Check pre-release status
51+ - name : Check version status
5252 id : check-version
5353 run : |
5454 version="$(hatchling version)"
@@ -62,16 +62,20 @@ jobs:
6262 # the other release steps. If this isn't the case, only a Test PyPI
6363 # release will be performed.
6464 if [[ "${GITHUB_REF}" == "refs/tags/v${version}" ]]; then
65+ echo "This is a new tagged release"
6566 echo "tagged_release=true" >> "$GITHUB_OUTPUT"
6667 else
68+ echo "This is an untagged dev release"
6769 echo "tagged_release=false" >> "$GITHUB_OUTPUT"
6870 fi
6971
7072 # This is used to mark the version as prerelease on PyPI if it doesn't
7173 # follow the full release x.y.z format (e.g. if it's 1.2.4a1)
7274 if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
75+ echo "This is a stable version release"
7376 echo "prerelease=false" >> "$GITHUB_OUTPUT"
7477 else
78+ echo "This is a pre-release version"
7579 echo "prerelease=true" >> "$GITHUB_OUTPUT"
7680 fi
7781
@@ -100,7 +104,7 @@ jobs:
100104 > changelog.txt
101105
102106 - name : Obtain preview changelog
103- if : " !startsWith(github.ref, 'refs/tags/')" # only on proper releases
107+ if : " !startsWith(github.ref, 'refs/tags/')" # only on dev/untagged releases
104108 env :
105109 VERSION : ${{ steps.check-version.outputs.version }}
106110 run : |
@@ -121,9 +125,9 @@ jobs:
121125 publish-github :
122126 name : " Publish a GitHub release"
123127 if : needs.build.outputs.tagged_release == 'true' # only publish to GitHub on tagged releases
124- needs : build # requires approval
128+ needs : build
125129 runs-on : ubuntu-latest
126- environment : release
130+ environment : release # requires approval
127131
128132 steps :
129133 - name : Download the distribution files from build artifact
0 commit comments