-
Notifications
You must be signed in to change notification settings - Fork 8
Support prereleases #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support prereleases #297
Conversation
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe GitHub Actions workflow for publishing releases was updated to enhance the release creation process. The workflow now uses a shell script to dynamically set flags for the Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub Actions
participant GitHub CLI
Developer->>GitHub Actions: Push tag
GitHub Actions->>GitHub Actions: Run workflow steps
GitHub Actions->>GitHub Actions: Assign tag & asset variables
GitHub Actions->>GitHub Actions: Initialize flags with --generate-notes
GitHub Actions->>GitHub Actions: If tag contains "-", add --prerelease flag
GitHub Actions->>GitHub CLI: Execute gh release create with flags
GitHub CLI->>GitHub: Create release (prerelease if applicable)
GitHub->>Developer: Release published (prerelease or standard)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.github/workflows/publish-release.yml (4)
6-6: Consider narrowing the tag pattern to SemVer.
The current globv*matches any tag starting with “v”, which may include non-version tags (e.g., “vault-test”). To strictly target semantic version tags (e.g.,v1.2.3), consider usingtags: ['v*.*.*']or a regex pattern.
31-38: Improve robustness of the release script.
- Fail fast if the build artifact is missing (
./build/ui-bundle.zip).- Quote
$ASSETwhen callinggh release createto safely handle paths with spaces.Example:
+if [ ! -f "$ASSET" ]; then + echo "Error: Asset $ASSET not found" >&2 + exit 1 +fi gh release create "$TAG" "$ASSET" $FLAGS
34-37: Refine prerelease flag detection.
Using*-*will treat any hyphenated tag as a prerelease, which is broad but usually works. For stricter SemVer prerelease matching, you could use a regex:if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)$ ]]; then FLAGS="$FLAGS --prerelease" fi
41-41: Explicitly set JSONContent-Typeheader.
When POSTing JSON to Netlify, it’s best practice to include the header:curl -X POST \ -H 'Content-Type: application/json' \ -d '{}' https://api.netlify.com/build_hooks/64e4682992f9ec30865c7c0b
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/publish-release.yml(1 hunks)
🔇 Additional comments (5)
.github/workflows/publish-release.yml (5)
2-2: Approve workflow renaming.
Renaming the workflow to “publish-release” clarifies its intent and aligns with the PR title.
15-15: Approve action version bump.
Updating toactions/checkout@v4ensures you’re using the latest stable release with up-to-date features and security patches.
17-17: Approve cache action version update.
Switching toactions/cache@v4takes advantage of recent performance improvements and bug fixes.
26-26: Approve bundling step.
Runninggulp bundleremains the correct approach for generating your UI assets prior to release.
28-30: Good: ScopedGITHUB_TOKENto the release step.
Moving theGITHUB_TOKENenvironment variable inside this specific step adheres to least-privilege principles and makes the workflow permissions clearer.
* Compile partial HTML for embedding into Bump API docs * Quiet logs * 📝 Add docstrings to `bump-partials` (#296) Docstrings generation was requested by @JakeSCahill. * #295 (comment) The following files were modified: * `compile-partial.js` * `gulpfile.js` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Fix inconsistency * Support prereleases (#297) * Bump * Update Bump * Update compile-partial.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Remove static * Add styles * Add styles * Update engine * Update node * Fix css * Avoid prism * Mobile header * No dark mode header * Fix linter * Update order * edits * don't load site.js * fix scripts * Continue supporting Rapidoc for now --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This pull request updates the
.github/workflows/publish-release.ymlfile to improve the release process by making it aware of prerelease tags and enhancing the formatting of certain commands.Release process improvements:
v1.0.0-beta), the release is marked as a prerelease.Command formatting enhancements: