Skip to content

fix(ci): read GITHUB_OUTPUT from the environment in tag_release - #63

Open
Roman-Cohere wants to merge 1 commit into
mainfrom
roman/fix-tag-release-output
Open

Roman-Cohere wants to merge 1 commit into
mainfrom
roman/fix-tag-release-output

Conversation

@Roman-Cohere

@Roman-Cohere Roman-Cohere commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

tag_release has failed on every push to main since #37 added it. The "Determine version" step runs Python from a quoted heredoc (<<'PY'), so the shell leaves $GITHUB_OUTPUT unexpanded, and Python appends the version to a file literally named $GITHUB_OUTPUT in the workspace. The step's output stays empty, and "Create tag if missing" fails with:

fatal: '' is not a valid tag name.

That happened on the merges of 0.4.4, 0.4.5 and #62 (0.4.6); those tags were pushed by hand.

Change

The script reads the path from os.environ["GITHUB_OUTPUT"].

Testing

  • Ran the step's script locally with GITHUB_OUTPUT set: it writes version=0.4.6 to that file.
  • actionlint passes.
  • After this merges, the job should print version=0.4.6, find the existing 0.4.6 tag and skip; the next version bump will tag itself.

Note

Low Risk
CI-only change to how the release tagging step writes step outputs; no application runtime behavior.

Overview
Fixes tag_release failing on every push to main since the “Determine version” step was added with a quoted heredoc (<<'PY'), which prevented the shell from expanding $GITHUB_OUTPUT. Python was appending the version to a workspace file literally named $GITHUB_OUTPUT, so steps.version.outputs.version stayed empty and tagging failed with an invalid tag name.

The script now uses os.environ["GITHUB_OUTPUT"] so the version is written to GitHub Actions’ output file as intended.

Reviewed by Cursor Bugbot for commit bea900e. Bugbot is set up for automated code reviews on this repo. Configure here.

The version step's heredoc is quoted ('PY'), so the shell does not expand
$GITHUB_OUTPUT and Python wrote the version to a file literally named
"$GITHUB_OUTPUT". The step output stayed empty and the tag step failed
with "'' is not a valid tag name" on every release since #37.

Co-authored-by: North Code <noreply@cohere.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.

1 participant