We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1090331 commit 9b64d15Copy full SHA for 9b64d15
1 file changed
.github/workflows/publish.yml
@@ -20,6 +20,8 @@ jobs:
20
stable: ${{ steps.version.outputs.stable }}
21
steps:
22
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23
+ with:
24
+ fetch-depth: 0
25
26
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
27
with:
@@ -38,6 +40,11 @@ jobs:
38
40
39
41
if [[ "$package_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
42
echo "stable=true" >> "$GITHUB_OUTPUT"
43
+ release_commit="$(git rev-parse "${RELEASE_TAG}^{commit}")"
44
+ if ! git merge-base --is-ancestor "$release_commit" origin/main; then
45
+ echo "Stable release $RELEASE_TAG must point to a commit contained in main." >&2
46
+ exit 1
47
+ fi
48
else
49
echo "stable=false" >> "$GITHUB_OUTPUT"
50
fi
0 commit comments