File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,12 +49,39 @@ jobs:
4949 name : Haskell Debugger Docs
5050 path : dist-newstyle/haskell-debugger*docs.tar.gz
5151
52+ validate-tag :
53+ name : Validate tag is at master HEAD
54+ runs-on : ubuntu-latest
55+ steps :
56+ - uses : actions/checkout@v4
57+ with :
58+ fetch-depth : 0
59+
60+ - name : Ensure tag points to master HEAD
61+ shell : bash
62+ run : |
63+ echo "Tag ref: $GITHUB_REF"
64+ echo "Tag commit: $GITHUB_SHA"
65+
66+ # Fetch latest master explicitly
67+ git fetch origin master
68+
69+ MASTER_SHA=$(git rev-parse origin/master)
70+ echo "origin/master HEAD: $MASTER_SHA"
71+
72+ if [[ "$GITHUB_SHA" != "$MASTER_SHA" ]]; then
73+ echo "Tag does not point to the tip of master."
74+ echo "Tag SHA: $GITHUB_SHA"
75+ echo "Master SHA: $MASTER_SHA"
76+ exit 1
77+ fi
78+
79+ echo "Tag is exactly at master HEAD."
80+
5281 release :
53- # only release from a tag pointing to master!
54- if : github.ref == 'refs/heads/master'
5582 name : Release
5683 runs-on : ubuntu-latest
57- needs : [build-haskell-debugger, docs-haskell-debugger]
84+ needs : [validate-tag, build-haskell-debugger, docs-haskell-debugger]
5885 steps :
5986 - uses : actions/checkout@v4
6087 with :
You can’t perform that action at this time.
0 commit comments