name: Monthly Release on: schedule: # Run on the 1st of every month at 00:00 UTC - cron: '0 1 1 * *' workflow_dispatch: permissions: contents: write jobs: release: name: Create monthly snapshot release runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 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" cat >> "$GITHUB_OUTPUT" <> "$GITHUB_OUTPUT" <