Skip to content

Improvement: Automate the creation of a version tag on a monthly basis #9

Improvement: Automate the creation of a version tag on a monthly basis

Improvement: Automate the creation of a version tag on a monthly basis #9

Workflow file for this run

name: Create a new version tag
on:
pull_request:
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:
token: ${{ secrets.T8DDY_TOKEN }}
fetch-depth: 0
ref: main
#create a new branch for the version tag
- name: Create version tag
run: |
git checkout -b new_version_4.0.0-$(date +'%Y.%m.%d')
git config user.email "[email protected]"
git config user.name "t8ddy"
git tag "v4.0.0-$(date +'%Y.%m.%d')"
git push --tags --set-upstream origin new_version_4.0.0-$(date +'%Y.%m.%d')
# Create a PR for the new version tag
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.T8DDY_TOKEN }}
commit-message: "Create new version tag v4.0.0-$(date +'%Y.%m.%d')"
title: "Create new version tag v4.0.0-$(date +'%Y.%m.%d')"
body: "This PR creates a new version tag v4.0.0-$(date +'%Y.%m.%d') for the quarterly release."
base: main
head: new_version_4.0.0-$(date +'%Y.%m.%d')