Skip to content

fix: skip the release when nothing changed - #103

Merged
filmil merged 1 commit into
mainfrom
ai-dev-20260810-Y2NMKH-skip-empty-release
Aug 10, 2026
Merged

fix: skip the release when nothing changed#103
filmil merged 1 commit into
mainfrom
ai-dev-20260810-Y2NMKH-skip-empty-release

Conversation

@filmil

@filmil filmil commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The problem

The cron releases the same tree over and over. v1.10.0 and v1.11.0 hold the
same code.

The workflow lives in release.yml here, not in tag-and-release.yml, but the
cause is the same mathieudutour/github-tag-action.

Read this part before you merge

This repository is the one case in the sweep where the change is not purely
mechanical. Your workflow sets default_bump: minor on purpose. I changed it
to false.

Any value other than false makes the action bump the version on every
run, even with no new commit, so no guard can ever work while minor stands.
But the change has a cost: a commit whose title is not a conventional commit
used to produce a minor release here, and now produces none. Use feat: for a
minor release and fix: for a patch release.

If you would rather keep minor, close this pull request. The guards alone
cannot help while it is set.

The change

  • default_bump: minor becomes default_bump: false.
  • The release steps now run only when tag_version.outputs.new_tag is not
    empty.
  • The build and release jobs now run only when needs.tag.outputs.new_tag
    is not empty.

Summary of commits

  • fix: skip the release when nothing changed — edits
    .github/workflows/release.yml only. 1 file changed.

Verification

A script added the guards, and I changed default_bump by hand. The script
declines to overwrite a default_bump that is already set, which is why it
needed the hand edit.

I then parsed the result with yaml.safe_load and checked that default_bump
is false, that no release step is left unguarded, and that both job guards
name new_tag, which is the output this tag job declares.

This pull request has been created by an automated coding assistant, with
human supervision.

Prompt used to generate this pull request:

when done: check all my GitHub repos, and if any have defined BCR and private registry publication workflows, send PRs to modify workflows to skip publication if no changes

The cron released the same tree over and over. v1.10.0 and v1.11.0 hold
the same code.

This repository set `default_bump: minor` on
`mathieudutour/github-tag-action`. Any value other than `false` makes the
action bump the version on every run, even when no commit landed since
the last tag.

This change:

* sets `default_bump: false`;
* guards the release steps on `tag_version.outputs.new_tag != ''`;
* guards the `build` and `release` jobs on
  `needs.tag.outputs.new_tag != ''`.

Note that this changes more here than in the other repositories of this
sweep. A commit whose title is not a conventional commit used to produce
a minor release, and now produces none. Use `feat:` for a minor release
and `fix:` for a patch release.

This commit has been created by an automated coding assistant,
with human supervision.

Prompt used to generate this commit:

  when done: check all my GitHub repos, and if any have defined BCR and private registry publication workflows, send PRs to modify workflows to *skip* publication if no changes
@filmil
filmil merged commit d1edd84 into main Aug 10, 2026
1 check passed
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.

1 participant