Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,35 @@ jobs:
pull-requests: write

steps:
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3.7.13
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main

- uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong output name may always evaluate to true

High Severity

In v4/v5 of release-please-action, releases_created (plural) has a documented bug (Issue #965) where it defaults to "true" even when no release is created. The official documentation and examples recommend using release_created (singular) for single-package repositories like this one. Since the manifest only defines a single package at ., using the plural form may cause all conditional steps—including the publish step with dry_run: false—to execute on every push to main.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c1fad87. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't believe this is correct. I verified the v5 source code directly — the relevant line is:

core.setOutput('releases_created', releases.length > 0);

This outputs the string "true" when releases exist and "false" when they don't. With the == 'true' comparison I added, the conditional works correctly:

  • Releases created → "true" == 'true'true (steps run)
  • No releases → "false" == 'true'false (steps skip)

The claim that releases_created "defaults to true even when no release is created" (Issue #965) doesn't match the actual source code. The plural releases_created is the correct output for checking whether any releases were created across all packages. The singular release_created is a path-specific output (set per-package), which also works for single-package repos but isn't necessary here.

No change needed — the current == 'true' comparison is correct.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

aside: Bot was confused here because this was the data type mistake. The value is "true"/"false" but it used to be true/false. So if checks started passing for "false" because !!"false" === true.

with:
fetch-depth: 0 # Full history is required for proper changelog generation

- name: Install Erlang and rebar3
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
uses: ./.github/actions/install-erlang

- uses: ./.github/actions/configure-rebar
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/ci
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/build-docs
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/publish
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
dry_run: false

- uses: ./.github/actions/publish-docs
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
Loading