From d97f7ac79094b94b1362d1ddccee4c825796986e Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Sun, 16 Nov 2025 01:36:51 -0500 Subject: [PATCH] ci: add monthly automated snapshot release workflow Add a scheduled GitHub Action that creates monthly snapshot releases on the 1st of each month. Releases are tagged as vYYYY.MM and include automated release notes with changes since the previous release. The workflow can also be manually triggered for ad-hoc releases. Assisted-by: Claude 3.5 Sonnet via GitHub Copilot --- .github/workflows/release.yml | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f7b12a2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,65 @@ +name: Monthly Release + +on: + schedule: + # Run on the 1st of every month at 00:00 UTC + - cron: '0 0 1 * *' + workflow_dispatch: + +permissions: + contents: write + +jobs: + release: + name: Create monthly snapshot release + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + + - name: Generate release tag + id: tag + run: | + TAG="v$(date +'%Y.%m')" + echo "tag=${TAG}" >> $GITHUB_OUTPUT + echo "Release tag: ${TAG}" + + - name: Generate release notes + id: notes + run: | + TAG="${{ steps.tag.outputs.tag }}" + PREVIOUS_TAG=$(git tag --sort=-version:refname | head -n1) + + if [ -z "$PREVIOUS_TAG" ]; then + echo "First release - no previous tag found" + NOTES="Monthly snapshot release ${TAG} + +This is an automated monthly snapshot of bluefin-common configuration files." + else + echo "Generating notes since ${PREVIOUS_TAG}" + NOTES="Monthly snapshot release ${TAG} + +## Changes since ${PREVIOUS_TAG} + +$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:'- %s (%h)' --no-merges) + +--- +*This is an automated monthly snapshot of bluefin-common configuration files.*" + fi + + echo "notes<> $GITHUB_OUTPUT + echo "$NOTES" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Create Release + uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 + with: + tag: ${{ steps.tag.outputs.tag }} + name: ${{ steps.tag.outputs.tag }} + body: ${{ steps.notes.outputs.notes }} + draft: false + prerelease: false + makeLatest: true