Skip to content

Add automated release job to Maven Publish workflow#155

Merged
mercyblitz merged 2 commits intomainfrom
copilot/update-release-notes
Mar 18, 2026
Merged

Add automated release job to Maven Publish workflow#155
mercyblitz merged 2 commits intomainfrom
copilot/update-release-notes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

After a successful Maven publish, the workflow had no mechanism to tag the release or publish release notes to GitHub.

Changes

  • New release job in maven-publish.yml — runs after build succeeds via needs: build
    • Checks out full history (fetch-depth: 0) so --generate-notes can diff against the previous tag
    • Creates and pushes a v{revision} tag (derived from the -Drevision input)
    • Creates a published GitHub Release titled v{revision} with Copilot-generated notes spanning from the previous tag to the new one, marked as latest
    • Both tag and release creation are idempotent — re-runs skip existing tags/releases rather than failing
  • permissions: contents: write scoped to the release job only, using the built-in GITHUB_TOKEN
release:
  runs-on: ubuntu-latest
  needs: build
  permissions:
    contents: write
  steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Create Tag
      run: |
        if git rev-parse "v${{ inputs.revision }}" >/dev/null 2>&1; then
          echo "Tag already exists, skipping."
        else
          git tag v${{ inputs.revision }}
          git push origin v${{ inputs.revision }}
        fi
    - name: Create Release
      run: |
        gh release create v${{ inputs.revision }} \
          --title "v${{ inputs.revision }}" \
          --generate-notes \
          --latest
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
Copilot AI changed the title [WIP] Update release notes after Maven Publish action Add automated release job to Maven Publish workflow Mar 18, 2026
Copilot AI requested a review from mercyblitz March 18, 2026 03:48
@mercyblitz mercyblitz marked this pull request as ready for review March 18, 2026 04:52
@mercyblitz mercyblitz merged commit 615c4cf into main Mar 18, 2026
5 checks passed
@mercyblitz mercyblitz deleted the copilot/update-release-notes branch April 4, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants