Skip to content

chore: release gate on merge and marking prerelease tags#598

Merged
SoulPancake merged 1 commit into
mainfrom
chore/release-gate-prerelease
Jun 9, 2026
Merged

chore: release gate on merge and marking prerelease tags#598
SoulPancake merged 1 commit into
mainfrom
chore/release-gate-prerelease

Conversation

@SoulPancake

@SoulPancake SoulPancake commented Jun 9, 2026

Copy link
Copy Markdown
Member

Description

This just ensures that release-please runs only on "release: " prefix PR merges or when triggered from workflow dispatch.

Another thing it does is marks beta/alpha/ other experimental tags as prerelease instead of latest like we do in the other SDKs.

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Copilot AI review requested due to automatic review settings June 9, 2026 10:23
@SoulPancake SoulPancake requested review from a team as code owners June 9, 2026 10:23
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The release-please workflows are updated to add an explicit if: guard that triggers the release job only on manual dispatch or on push to main with a commit message starting with release:. The reusable release workflow refines pre-release version detection and GitHub release management: versions matching X.Y.Z are treated as stable; others are marked as pre-releases, and the release refresh logic now updates existing releases instead of skipping them.

Changes

Release Workflow Triggering and Pre-Release Management

Layer / File(s) Summary
Release job trigger condition
.github/workflows/release-please.yaml
The release job runs on workflow_dispatch or when push to main has a head commit message starting with release:, preventing routine merges from triggering release-please.
Pre-release detection and release refresh
.github/workflows/reusable-release-please.yaml
The release-please step documentation is clarified; pre-release detection uses a strict X.Y.Z regex to identify stable versions; the post-release job now computes and applies a --prerelease flag, refreshes existing releases with updated notes, and applies the flag to new draft releases.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • openfga/language#594: Main PR's edits to .github/workflows/release-please.yaml job triggering and .github/workflows/reusable-release-please.yaml post-release prerelease/release refresh behavior directly build on the release-please workflows introduced in PR #594.

Suggested reviewers

  • sergiught
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: gating the release workflow on merge commits and implementing prerelease tag detection, which aligns with the workflow modifications documented in the summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-gate-prerelease

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the repository’s release automation so that release-please only runs on push when the merged commit represents a release, and so that GitHub Releases created/updated by the post-release job are marked as pre-releases when appropriate.

Changes:

  • Gate the release-please reusable workflow invocation on push events to only run for commits whose message starts with release:.
  • Enhance the post-release job to mark GitHub releases as pre-releases for non-stable versions and to refresh notes on existing releases.

Reviewed changes

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

File Description
.github/workflows/reusable-release-please.yaml Adds pre-release flagging logic and refreshes notes for existing GitHub releases during the post-release phase.
.github/workflows/release-please.yaml Adds a job-level condition to run the reusable workflow on push only for release: commits (and always on manual dispatch).

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

Comment thread .github/workflows/release-please.yaml
Comment thread .github/workflows/reusable-release-please.yaml
@SoulPancake SoulPancake added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 8de01d5 Jun 9, 2026
14 checks passed
@SoulPancake SoulPancake deleted the chore/release-gate-prerelease branch June 9, 2026 10:29
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