Preparatory steps to have https://gdal.org default to a 'stable' branch

This commit is contained in:
Even Rouault 2024-11-21 19:35:37 +01:00
parent 5a7aac3e76
commit 81489921bd
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D
4 changed files with 59 additions and 1 deletions

47
.github/workflows/auto_tag_stable.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Update Stable Tag
on:
push:
branches:
- '**' # Matches all branches, but we later filter on the one matching the STABLE_BRANCH repository variable
permissions:
contents: read
jobs:
update-stable-tag:
runs-on: ubuntu-latest
if: github.repository == 'OSGeo/GDAL'
permissions:
contents: write
steps:
- name: Check branch match
id: check_branch
env:
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }} # Repository variable
run: |
echo "Push detected on branch $GITHUB_REF"
if [[ "${GITHUB_REF#refs/heads/}" != "${STABLE_BRANCH}" ]]; then
echo "This workflow only runs for branch $STABLE_BRANCH. Skipping further steps."
echo "run=false" >> $GITHUB_OUTPUT
else
echo "run=true" >> $GITHUB_OUTPUT
fi
- name: Checkout code
if: steps.check_branch.outputs.run == 'true'
uses: actions/checkout@v4
- name: Tag
if: steps.check_branch.outputs.run == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "GDAL-bot@example.com"
git config --global user.name "GDAL-bot"
touch .dummy-file
git add .dummy-file
# Do that so that stable doesn't have the same git sha as the stable branch, so ReadTheDocs triggers a build
git commit -a -m "Add .dummy-file"
git checkout -b stable
git push -f origin stable

View File

@ -152,6 +152,11 @@ Process :
15) Once the vote has positively completed,
15.0) For a new feature release, update the STABLE_BRANCH repository variable
Go to https://github.com/OSGeo/GDAL/settings/variables/actions/STABLE_BRANCH
and update the value to be release/x.y
15.1) Tag the release as final:
git checkout v3.1.0RC1

View File

@ -160,7 +160,9 @@ html_theme_options = {
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_extra_path = ["../build/html_extra"]
# For generated content and robots.txt
html_extra_path = ["../build/html_extra", "extra_path"]
html_js_files = ["announcement.js"]
html_css_files = ["announcement.css"]

View File

@ -0,0 +1,4 @@
User-agent: *
Allow: /en/stable/
Disallow: /en/
Sitemap: https://gdal.org/sitemap.xml