Skip to content

Fix build#811

Merged
jodastephen merged 1 commit intomainfrom
fixup-bulid
Mar 29, 2025
Merged

Fix build#811
jodastephen merged 1 commit intomainfrom
fixup-bulid

Conversation

@jodastephen
Copy link
Copy Markdown
Member

@jodastephen jodastephen commented Mar 29, 2025

Summary by CodeRabbit

  • Chores
    • Enhanced release and website deployment workflows by adding safeguards to prevent accidental tag deletion on the main branch.
    • Updated the deployment process to explicitly manage tag fetching.
    • Enabled the automatic release of artefacts following the staging process.

* Avoid attempt to delete main branch
* Fetch tags manually actions/checkout#1467
* Auto-release
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 29, 2025

📝 Walkthrough

Walkthrough

The pull request updates two GitHub Actions workflows and the Maven configuration. In both workflows, the conditional logic for tag deletion has been modified to prevent the deletion from occurring when the event originates from the main branch. The website workflow additionally revises its tag fetching process by removing the default fetch flag during checkout in favour of an explicit git fetch --tags command. In the Maven configuration, the nexus-staging-maven-plugin is adjusted to automatically release artifacts after closing the staging repository.

Changes

Files Change Summary
.github/workflows/release.yml
.github/workflows/website.yml
Updated tag deletion conditions to include github.ref != 'refs/heads/main', ensuring deletion only when not on the main branch. Additionally, in website.yml, removed fetch-tags: true from checkout and added explicit git fetch --tags step.
pom.xml Modified the <autoReleaseAfterClose> property within the nexus-staging-maven-plugin section from false to true, enabling automatic release of artifacts after staging repository closure.

Sequence Diagram(s)

sequenceDiagram
  participant CI as Release Workflow
  participant Repo as Repository
  CI->>Repo: Trigger release event
  Repo-->>CI: Provide branch reference
  Note over CI: Check if branch ≠ "main"
  alt Not main branch
    CI->>Repo: Execute "Delete release tag" step
  else Main branch
    CI->>Repo: Skip tag deletion
  end
Loading
sequenceDiagram
  participant CI as Website Workflow
  participant Repo as Repository
  CI->>Repo: Trigger deployment event
  CI->>Repo: Checkout code (tags not fetched)
  CI->>Repo: Execute "Setup git" with `git fetch --tags`
  Note over CI: Check if branch ≠ "main"
  alt Not main branch
    CI->>Repo: Execute "Delete website tag" step
  else Main branch
    CI->>Repo: Skip tag deletion
  end
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a963c21 and dc915ae.

📒 Files selected for processing (3)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/website.yml (2 hunks)
  • pom.xml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: Fuzzing
🔇 Additional comments (4)
.github/workflows/release.yml (1)

63-67: Prevent Deletion of Main Branch Release Tag
The updated condition now safeguards against deleting release tags when the workflow is triggered on the main branch. This adjustment is critical to avoid accidental removal of important tags during main branch events.

pom.xml (1)

942-945: Enable Auto-release Post Staging Close
Changing <autoReleaseAfterClose> from false to true in the nexus-staging-maven-plugin configuration helps streamline the release process by automatically releasing artefacts after the staging repository is closed. Please ensure that your quality validation steps are robust enough to avoid the risk of releasing erroneous artefacts.

.github/workflows/website.yml (2)

26-28: Explicit Tag Fetch for Deployment Reliability
The added command git fetch --tags ensures that all tags are explicitly retrieved after checkout, reducing the chance of missing tag information during deployment operations.


69-74: Conditional Deletion of Website Tag
The newly introduced condition if: github.ref != 'refs/heads/main' prevents deletion of website tags when operating on the main branch. This safeguard aligns with best deployment practices and helps maintain integrity on the primary branch.


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@jodastephen jodastephen merged commit 20e94ae into main Mar 29, 2025
6 checks passed
@jodastephen jodastephen deleted the fixup-bulid branch March 29, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant