Skip to content

chore(ci): do not publish pre-releases as latest#314

Merged
SoulPancake merged 1 commit into
mainfrom
chore/release-do-not-publish-beta-releases-as-latest
Feb 10, 2026
Merged

chore(ci): do not publish pre-releases as latest#314
SoulPancake merged 1 commit into
mainfrom
chore/release-do-not-publish-beta-releases-as-latest

Conversation

@rhamzeh

@rhamzeh rhamzeh commented Feb 9, 2026

Copy link
Copy Markdown
Member

Description

This allows us to publish pre-releases without affecting the main release. Also changed it so the GitHub release is a draft by default allowing us to do edits before publishing.

Version npm tag GitHub Release
v0.9.2 latest Latest
v0.9.2-alpha.1 alpha Prerelease
v0.9.2-beta.1 beta Prerelease
v0.9.2-rc.1 rc Prerelease

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

Summary by CodeRabbit

  • Chores
    • Improved release automation infrastructure, including enhanced git tag validation and npm publishing configuration for better handling of prerelease versions.

@rhamzeh
rhamzeh requested a review from a team as a code owner February 9, 2026 19:32
Copilot AI review requested due to automatic review settings February 9, 2026 19:32
@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown

Walkthrough

Updated CI/CD pipeline in GitHub Actions workflow to validate git tag format, determine appropriate npm publish tag (alpha/beta/rc/latest), and enhanced release automation configuration with prerelease regex, changelog file, and draft mode settings.

Changes

Cohort / File(s) Summary
CI/CD Workflow Configuration
.github/workflows/main.yaml
Added new validation step to verify git tag format and extract npm publish tag type; modified npm publish step to utilize the determined tag; updated create-release action configuration with prerelease_regex pattern, changelog_file reference, and create_draft flag.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(ci): do not publish pre-releases as latest' directly describes the main objective and primary change—preventing pre-releases from being published with the latest npm tag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/release-do-not-publish-beta-releases-as-latest

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
.github/workflows/main.yaml (1)

128-128: Consider quoting the tag output for defensive shell hygiene.

Since ${{ }} is substituted before the shell runs, an empty or whitespace-containing value would break the command. The prior step guards against this, but quoting is cheap insurance.

Suggested change
-        run: npm publish --tag ${{ steps.npm-tag.outputs.tag }}
+        run: npm publish --tag "${{ steps.npm-tag.outputs.tag }}"

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.

@dosubot

dosubot Bot commented Feb 9, 2026

Copy link
Copy Markdown

Related Documentation

Checked 7 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.55%. Comparing base (65923f4) to head (dd424ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   89.55%   89.55%           
=======================================
  Files          25       25           
  Lines        1475     1475           
  Branches      277      277           
=======================================
  Hits         1321     1321           
  Misses         93       93           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the release workflow to ensure tagged pre-releases publish to npm under a non-latest dist-tag and create GitHub releases as drafts/prereleases, preventing pre-releases from overriding the “main” release.

Changes:

  • Add a tag-validation step that derives the correct npm dist-tag (latest vs alpha/beta/rc) from the Git tag.
  • Publish to npm using npm publish --tag ... based on the derived dist-tag.
  • Configure the GitHub release action to treat -alpha/-beta/-rc tags as prereleases and to create releases as drafts by default.

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

Comment thread .github/workflows/main.yaml
@SoulPancake
SoulPancake added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit 35b9c92 Feb 10, 2026
26 checks passed
@SoulPancake
SoulPancake deleted the chore/release-do-not-publish-beta-releases-as-latest branch February 10, 2026 05:31
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.

4 participants