Bump our Calendar Version #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to automatically create monthly version tags | |
# This workflow runs on the first day of each month at 3:30 AM UTC | |
# It can also be triggered manually via workflow_dispatch | |
name: Bump our Calendar Version | |
on: | |
# Allow manual triggering of the workflow | |
workflow_dispatch: | |
# Schedule the workflow to run monthly | |
schedule: | |
# Runs at 03:30 UTC on the first day of every month | |
# Cron syntax: minute hour day-of-month month day-of-week | |
- cron: '30 3 1 * *' | |
jobs: | |
tag: | |
# Job to create a new version tag based on the current year and month | |
# This helps track monthly releases in a calendar-based versioning scheme | |
name: Tag Monthly Release | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
# This is required to perform any operations on the repository | |
- uses: actions/checkout@v4 | |
# Step 2: Get current timestamp | |
# This action provides formatted date/time outputs that we can use | |
# for creating our version tag | |
- name: Get Current Time | |
uses: josStorer/[email protected] | |
id: current-time # This ID is used to reference the outputs in later steps | |
# Step 3: Create the version tag | |
# Creates a new tag in the format YYYY.MM.0 (e.g., 2024.01.0 for January 2024) | |
# The .0 suffix allows for potential patch releases within the same month if needed | |
- name: Bump Calendar Version | |
uses: rickstaa/[email protected] | |
with: | |
# Combine year and month from current-time outputs to form the tag | |
# Format: YYYY.MM.0 (year.month.patch) | |
# The .0 suffix indicates this is the initial release for this month | |
tag: ${{ steps.current-time.outputs.year }}.${{ steps.current-time.outputs.month }}.0 |