Skip to content

feat: add release-please for automated releases#306

Merged
omercnet merged 5 commits intomainfrom
feat/release-please
Mar 31, 2026
Merged

feat: add release-please for automated releases#306
omercnet merged 5 commits intomainfrom
feat/release-please

Conversation

@orius123
Copy link
Copy Markdown
Member

Summary

  • Replace manual publish.yaml workflow with release-please.yaml
  • Add release-please-config.json and .release-please-manifest.json
  • Uses simple release type with XML XPath to bump pom.xml version (same pattern as descope-dotnet)

How it works

  1. Push to main → release-please creates/updates a "Release PR" with version bump + CHANGELOG
  2. Merge the Release PR → GitHub Release is created → publish job deploys to Maven Central
  3. Maven Central publish uses the same mvn -B deploy -P ci command and credentials as before

Prerequisites

  • RELEASE_APP_ID and RELEASE_APP_PEM secrets must be configured (same GitHub App used by python-sdk, node-sdk, descope-dotnet)

Test plan

  • Verify CI passes
  • After merge, confirm release-please creates a Release PR on next push to main
  • Verify the Release PR bumps pom.xml version and generates CHANGELOG.md

Replace manual publish workflow with release-please automation.
On push to main, release-please creates a release PR with version
bump and changelog. Merging the PR triggers Maven Central publish.
Copilot AI review requested due to automatic review settings March 29, 2026 09:53
@shuni-bot-dev
Copy link
Copy Markdown

shuni-bot-dev bot commented Mar 29, 2026

🐕 Review complete — View session on Shuni Portal 🐾

Copy link
Copy Markdown

@shuni-bot-dev shuni-bot-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐕 Shuni's Review

Replaces manual publish.yaml (triggered on GitHub release) with release-please.yaml that automates version bumps, changelogs, and Maven Central publishing via a two-phase workflow.

No issues found — good bones! Manifest version matches pom.xml, bootstrap SHA points to the correct commit, publish job correctly checks out the release tag, and Maven credentials are carried over identically. Woof!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces release-please-based automation to replace the manual release-triggered publish workflow, so releases are generated via a Release PR and publishing to Maven Central happens only when a GitHub Release is created.

Changes:

  • Added release-please configuration + manifest for versioning and changelog generation.
  • Added a new Release Please GitHub Actions workflow that creates Release PRs and publishes on release creation.
  • Removed the legacy publish.yaml workflow that published on GitHub Release creation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
release-please-config.json Configures release-please (simple strategy) and adds XML-based version bumping for pom.xml.
.release-please-manifest.json Initializes the manifest version for the root package.
.github/workflows/release-please.yaml Adds combined release-please + Maven Central publish workflow.
.github/workflows/publish.yaml Removes the prior release-triggered publish workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The simple type with XPath doesn't handle Maven's XML namespace.
The maven release type natively handles pom.xml version updates,
matching the pattern of other SDKs (python uses python, node uses node).
Also adds include-v-in-tag: false to match existing tag format.
No new secrets needed — uses the same GITHUB_TOKEN that's already
available. The publish job runs in the same workflow via release_created
output, so a GitHub App token is unnecessary.
@orius123 orius123 requested a review from omercnet March 29, 2026 14:53
@orius123
Copy link
Copy Markdown
Member Author

@shuni please fix Omer's comment #306 (comment)

@shuni-bot
Copy link
Copy Markdown
Contributor

shuni-bot bot commented Mar 31, 2026

🐕 Done! Updated PR: #306

View workflow run

📋 Actions Taken

View AI response

Perfect! I've successfully fixed Omer's comment. Here's what I did:

Changes Made

Updated .github/workflows/release-please.yaml to use the release app token instead of the default GITHUB_TOKEN:

  1. Added token generation step (lines 18-23):

    • Uses tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a action
    • Generates token from RELEASE_APP_ID and RELEASE_APP_PEM secrets
  2. Passed token to release-please action (line 29):

    • Added token: ${{ steps.get_token.outputs.token }} parameter
  3. Reduced workflow permissions (line 9):

    • Changed from contents: write and pull-requests: write to just contents: read
    • The app token has the necessary permissions, so broad workflow permissions aren't needed

This follows the exact same pattern used in descope-dotnet and ensures that the publish workflow will be triggered when the release PR is merged (the default GITHUB_TOKEN doesn't trigger subsequent workflows, but the GitHub App token does).

Commit

Created commit fe0f547 with the changes following conventional commit style.

The workflow is now ready and matches the established pattern across Descope repos! 🐕


View session on Shuni Portal 🐾

orius123 and others added 2 commits March 31, 2026 12:54
The release-please action needs to use a GitHub App token instead of
the default GITHUB_TOKEN to ensure the publish workflow is triggered
when a release PR is merged. This follows the same pattern used in
descope-dotnet and other repos.

Changes:
- Add step to generate token from RELEASE_APP_ID and RELEASE_APP_PEM
- Pass token to release-please action
- Reduce workflow permissions to contents:read (app token has necessary permissions)

Co-authored-by: Shuni <251468265+shuni-bot[bot]@users.noreply.github.com>
@omercnet omercnet merged commit 43a7bcb into main Mar 31, 2026
17 checks passed
@omercnet omercnet deleted the feat/release-please branch March 31, 2026 10:28
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.

3 participants