Skip to content

Conversation

@JakeSCahill
Copy link
Contributor

This pull request updates the .github/workflows/publish-release.yml file to improve the release process by making it aware of prerelease tags and enhancing the formatting of certain commands.

Release process improvements:

  • Updated the GitHub release creation step to handle prerelease tags automatically. If the tag contains a hyphen (e.g., v1.0.0-beta), the release is marked as a prerelease.

Command formatting enhancements:

  • Fixed formatting in the Netlify build hook trigger step by ensuring the payload is correctly enclosed in single quotes.

@netlify
Copy link

netlify bot commented May 28, 2025

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit 0e6c8a8
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/68373c7e311fa2000837df60
😎 Deploy Preview https://deploy-preview-297--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 28, 2025

📝 Walkthrough

Walkthrough

The 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 gh release create command. It assigns the tag name and asset path to variables, initializes release flags with --generate-notes, and adds the --prerelease flag if the tag name contains a hyphen. The release creation step is explicitly named, and the GITHUB_TOKEN environment variable is moved inside this step. No changes were made to exported or public entities in the codebase.

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)
Loading

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JakeSCahill JakeSCahill requested a review from Feediver1 May 28, 2025 16:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 glob v* 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 using tags: ['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 $ASSET when calling gh release create to 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 JSON Content-Type header.
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

📥 Commits

Reviewing files that changed from the base of the PR and between f1c8f2e and 0e6c8a8.

📒 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 to actions/checkout@v4 ensures you’re using the latest stable release with up-to-date features and security patches.


17-17: Approve cache action version update.
Switching to actions/cache@v4 takes advantage of recent performance improvements and bug fixes.


26-26: Approve bundling step.
Running gulp bundle remains the correct approach for generating your UI assets prior to release.


28-30: Good: Scoped GITHUB_TOKEN to the release step.
Moving the GITHUB_TOKEN environment variable inside this specific step adheres to least-privilege principles and makes the workflow permissions clearer.

@JakeSCahill JakeSCahill merged commit fa9c9e6 into main May 29, 2025
6 checks passed
@JakeSCahill JakeSCahill deleted the JakeSCahill-patch-1 branch May 29, 2025 18:42
JakeSCahill added a commit that referenced this pull request Jun 4, 2025
JakeSCahill added a commit that referenced this pull request Jun 7, 2025
* 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>
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