Skip to content
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a85fef1
Automate the creation of a version tag on a monthly basis
Davknapp Dec 9, 2025
64c7de6
test
Davknapp Dec 9, 2025
b972dee
fix push command
Davknapp Dec 9, 2025
f4d82c0
update token and checkout-action
Davknapp Dec 9, 2025
83b6edd
update token
Davknapp Dec 9, 2025
fa06673
update name of the job
Davknapp Dec 9, 2025
32e33e0
create branch and tag in one command
Davknapp Dec 9, 2025
7be34e4
update a comment
Davknapp Dec 9, 2025
e70a471
checkout the main branch
Davknapp Dec 9, 2025
6750417
test
Davknapp Dec 9, 2025
3a1a299
delete content specification
Davknapp Dec 9, 2025
ea47e20
test push
Davknapp Dec 9, 2025
e0d3386
another test
Davknapp Dec 9, 2025
d3bdfe5
fix usage of create pr
Davknapp Dec 9, 2025
b6f07bd
test
Davknapp Dec 9, 2025
21682ca
replace explicit version naming
Davknapp Dec 9, 2025
a92745c
avoid duplicate authorization
Davknapp Dec 9, 2025
47bbfca
manage authorization
Davknapp Dec 9, 2025
95d2016
test
Davknapp Dec 9, 2025
e7c6469
we actually don't need to create a new branch for a tag
Davknapp Dec 9, 2025
5b1b41f
dont trigger on push
Davknapp Dec 9, 2025
6ebceeb
add license statement
Davknapp Dec 17, 2025
508509f
try automated extraction of the latest version
Davknapp Dec 17, 2025
7f07e4b
update comment
Davknapp Dec 17, 2025
812293d
Moved and renamed file
Davknapp Dec 17, 2025
9ad639b
Merge remote-tracking branch 'origin/main' into rolling-release
Davknapp Dec 17, 2025
eff4b6c
Trigger on PR for tests
Davknapp Dec 17, 2025
7e5440f
Use envariables to create the name of the new tag.
Davknapp Dec 17, 2025
546f35d
fix autofill type
Davknapp Dec 17, 2025
0b03002
fix debug output
Davknapp Dec 17, 2025
759ec5f
use env vars
Davknapp Dec 17, 2025
fcff52c
try to fix debug output
Davknapp Dec 17, 2025
70c6e1f
remove test trigger
Davknapp Dec 17, 2025
527d311
Update .github/workflows/create_version_tag.yml
Davknapp Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/create_version_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create a new version tag

# This file is part of t8code.
# t8code is a C library to manage a collection (a forest) of multiple
# connected adaptive space-trees of general element types in parallel.
#
# Copyright (C) 2025 the developers
#
# t8code is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# t8code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with t8code; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

on:
workflow_dispatch:
schedule:
# trigger at 0:00 on the first day of each month
- cron: '0 0 1 * *'

jobs:
monthly_release:
runs-on: ubuntu-latest
steps:
#checkout main branch
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: main
persist-credentials: false
# Get the current version from the latest tag
- name: Get latest tag
id: get_latest_tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "LATEST_TAG=$LATEST_TAG"
# Get Major, Minor, Patch version numbers
- name: Parse version numbers
id: parse_version
run: |
VERSION_REGEX="v([0-9]+)\\.([0-9]+)\\.([0-9]+)"
if [[ "${{ env.LATEST_TAG }}" =~ $VERSION_REGEX ]]; then
MAJOR="${BASH_REMATCH[1]}"
MINOR="${BASH_REMATCH[2]}"
PATCH="${BASH_REMATCH[3]}"
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MINOR=$MINOR" >> $GITHUB_ENV
echo "PATCH=$PATCH" >> $GITHUB_ENV
echo "MAJOR=$MAJOR, MINOR=$MINOR, PATCH=$PATCH"
else
echo "No valid tag found, aborting."
exit 1
fi
# Create version name accessible in the following steps
- name: Set version name
run: |
echo "VERSION_NAME=v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}-$(date +'%Y.%m.%d')" >> $GITHUB_ENV
echo "VERSION_NAME=$VERSION_NAME"
# Create a new version tag
- name: Create version tag
run: |
git config user.email "t8ddy.bot@gmail.com"
git config user.name "t8ddy"
# configure remote to use the secret token for pushing
git remote set-url origin https://x-access-token:${{ secrets.T8DDY_TOKEN }}@github.com/${{ github.repository }}
git tag "${{ env.VERSION_NAME }}"
git push origin --tags