File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1717 fetch-depth : 0 # Fetch the full history
1818 ref : ${{ github.ref }} # Check out the current branch or tag
1919
20- - name : Fetch tags only
21- run : git fetch --tags --no-recurse-submodules
20+ - name : Fetch version tags only (vx.y.z)
21+ run : |
22+ TAGS=$(git ls-remote --tags origin 'v*[0-9].[0-9].[0-9]' | sed 's/.*refs\/tags\///' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$')
23+ for tag in $TAGS; do
24+ git fetch origin "refs/tags/$tag:refs/tags/$tag" --no-recurse-submodules
25+ done
2226
2327 - name : Set up Python
2428 uses : actions/setup-python@v4
@@ -33,12 +37,12 @@ jobs:
3337 - name : Build documentation
3438 run : uv run sphinx-multiversion docs/source docs/build/html --keep-going --no-color
3539
36- - name : Get the latest tag
40+ - name : Get the latest stable tag
3741 run : |
3842 # Fetch all tags
3943 git fetch --tags
40- # Get the latest tag
41- latest_tag=$(git tag --sort=-creatordate | head -n 1)
44+ # Get the latest stable tag
45+ latest_tag=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
4246 echo "LATEST_RELEASE=$latest_tag" >> $GITHUB_ENV
4347
4448 - name : Generate index.html for judge0.github.io/judge0-python.
You can’t perform that action at this time.
0 commit comments