Skip to content

Fix release workflow#22

Merged
guibranco merged 2 commits intomainfrom
chore/fix-release
Apr 23, 2026
Merged

Fix release workflow#22
guibranco merged 2 commits intomainfrom
chore/fix-release

Conversation

@guibranco
Copy link
Copy Markdown
Owner

@guibranco guibranco commented Apr 23, 2026

📑 Description

Fix release workflow

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

☢️ Does this introduce a breaking change?

  • Yes
  • No

Summary by Sourcery

Simplify and harden the release workflow to always run validation jobs while safely handling version tagging and CI triggers.

Build:

  • Remove the pre-release tag existence check outputs and always run test and plugin-check jobs in the release workflow.
  • Adjust the release job to include a [skip ci] version-bump commit message so the bot’s push does not retrigger the workflow.
  • Guard tag creation and pushing in the release job by checking for an existing remote tag before creating a new one.
  • Update the GitHub release step to use softprops/action-gh-release@v2 instead of v3.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@guibranco has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 27 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 30 minutes and 27 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec17c244-9c63-4d8b-bf7b-d7d7c297a444

📥 Commits

Reviewing files that changed from the base of the PR and between 749e440 and 172a487.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/fix-release

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.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 23, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the release GitHub Actions workflow to always run tests/plugin checks, prevent re-triggering the workflow from the bot’s version-bump commit, and handle existing tags safely while updating the release action version.

Sequence diagram for updated release job tag handling and [skip ci] commit

sequenceDiagram
  participant WF as Workflow_release
  participant Version as Job_version
  participant Release as Job_release
  participant Git as GitHub_repo_origin
  participant GHRel as GitHub_Releases_API

  WF->>Version: Compute semVer with GitVersion
  Version-->>WF: semVer output

  WF->>Release: Start release job with semVer
  Release->>Release: Update ipquery.php and readme.txt with semVer
  Release->>Release: git add version files
  Release->>Release: git diff --cached --quiet
  alt Version files changed
    Release->>Git: git commit -m "chore: bump version to semVer [skip ci]"
  else No changes
    Release->>Release: Skip commit
  end

  Release->>Git: git ls-remote --tags origin
  alt Tag vSemVer already exists
    Release->>Git: git push origin main
  else Tag vSemVer does not exist
    Release->>Git: git tag vSemVer
    Release->>Git: git push origin main vSemVer
  end

  Release->>Release: Build release ZIP
  Release->>GHRel: Create GitHub Release using tag vSemVer (softprops/action-gh-release@v2)
Loading

File-Level Changes

Change Details Files
Remove tag-existence output from the version job and always run downstream test and plugin-check jobs.
  • Drop tag_exists from version job outputs
  • Delete the explicit tag-existence check step in the version job
  • Remove conditional if on needs.version.outputs.tag_exists from the test and plugin-check jobs so they always execute
.github/workflows/release.yml
Improve release job to avoid retrigger loops and safely handle pre-existing tags when pushing.
  • Clarify release job comment that the version-bump commit message uses [skip ci] to prevent workflow retriggering
  • Change commit step to add [skip ci] to the version-bump commit message and only commit when version files changed
  • Wrap tag creation and push in conditional logic that checks remote for an existing tag, pushing only main when the tag already exists and otherwise creating and pushing the new tag
.github/workflows/release.yml
Update GitHub Release publication action to the desired version.
  • Change softprops/action-gh-release from v3 to v2 for the Publish GitHub Release step
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@guibranco guibranco enabled auto-merge (squash) April 23, 2026 15:25
@gstraccini gstraccini Bot added the ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) label Apr 23, 2026
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The remote tag existence check in the release job has a race window between git ls-remote and git tag/git push; if concurrent workflows run, consider using an atomic push (e.g. git push --atomic origin main v${VERSION}) or a server-side protection to avoid duplicate/rejected tags.
  • The new inline tag-existence logic in the release job duplicates the earlier (now removed) tag check behavior in version; if you expect to evolve this further, consider centralizing the tag-existence check in a single step/job to keep the workflow logic easier to reason about.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The remote tag existence check in the release job has a race window between `git ls-remote` and `git tag`/`git push`; if concurrent workflows run, consider using an atomic push (e.g. `git push --atomic origin main v${VERSION}`) or a server-side protection to avoid duplicate/rejected tags.
- The new inline tag-existence logic in the `release` job duplicates the earlier (now removed) tag check behavior in `version`; if you expect to evolve this further, consider centralizing the tag-existence check in a single step/job to keep the workflow logic easier to reason about.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
12 0 12

⚠️ Warnings (12)

📁 admin/views/dashboard.php (10 warnings)
📍 Line 🔖 Check 💬 Message
18 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$total_visits".
19 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$unique_ips".
20 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$risk_counts".
21 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$top_countries".
22 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$top_cities".
52 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$risky_pct".
106 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$row".
145 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$row".
173 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$risk_items".
205 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item".
📁 includes/class-ipquery-db.php (2 warnings)
📍 Line 🔖 Check 💬 Message
268 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $rows_sql used in $wpdb->get_results()\n$rows_sql assigned unsafely at line 267.
272 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $count_sql used in $wpdb->get_var()\n$count_sql assigned unsafely at line 271.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@guibranco guibranco merged commit f9b3c38 into main Apr 23, 2026
14 checks passed
@guibranco guibranco deleted the chore/fix-release branch April 23, 2026 15:26
@penify-dev
Copy link
Copy Markdown

penify-dev Bot commented Apr 23, 2026

Failed to generate code suggestions for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☑️ auto-merge Automatic merging of pull requests (gstraccini-bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants