Skip to content

feat: Added action for bumping release version - #116

Merged
ShrimpCryptid merged 10 commits into
mainfrom
feat/add-version-bump-workflow
Sep 18, 2026
Merged

ShrimpCryptid merged 10 commits into
mainfrom
feat/add-version-bump-workflow

Conversation

@ShrimpCryptid

Copy link
Copy Markdown
Contributor

Problem

Realized that I needed to set up version bumping for tfe-data! I referenced the existing action we have here (https://github.com/AllenCell/github-restructure/blob/workflow-templates/.github/workflows/release-new-version-tag-only.yml) but also reworked it to use the built-in tooling (bump-my-version) installed in this repo.

Estimated review size: small, 5 minutes

Solution

  • Added GitHub action for creating, tagging, and drafting new releases.

Type of change

  • New feature (non-breaking change which adds functionality)

@ShrimpCryptid ShrimpCryptid self-assigned this Sep 16, 2026
@ShrimpCryptid ShrimpCryptid added new feature New feature or request internals labels Sep 16, 2026
@ShrimpCryptid
ShrimpCryptid requested a balanced review from Copilot September 16, 2026 20:52
Comment thread .bumpversion.toml
Comment on lines -8 to -10
[[tool.bumpversion.files]]
glob = "documentation/**/*.md"

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.

Fixed an issue where bump-my-version would throw an error since some documentation markdown files do not have version numbers present

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow has validation, authentication, shell syntax, output propagation, and tag handling defects that prevent successful releases.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds release automation for version bumping, tagging, and draft release creation.

Changes:

  • Adds a manually dispatched release workflow.
  • Narrows documentation version updates to DATA_FORMAT.md.
File summaries
File Description
.github/workflows/release-new-version.yml Automates version bumps and draft releases.
.bumpversion.toml Refines version-managed documentation files.
Review details

Suppressed comments (5)

.github/workflows/release-new-version.yml:38

  • This disables the only credentials available to the later git push. Although the job grants contents: write, no token is supplied to Git separately, so pushing to the HTTPS origin will fail authentication. Keep checkout credentials for the push (or explicitly authenticate the push).
          persist-credentials: false

.github/workflows/release-new-version.yml:51

  • This step fails before producing a tag: ${ BUMP_TYPE } is invalid shell substitution, and .bumpversion.toml enables commits while Git identity is only configured in the following step. Configure the identity before running the bump and use valid variable expansion.
      - name: Bump version
        run: bump-my-version bump -v ${ BUMP_TYPE }
        env:
          BUMP_TYPE: ${{ inputs.increment }}

.github/workflows/release-new-version.yml:57

  • Only pushing tags leaves the default branch at the old version even though bump-my-version creates a version commit. A subsequent run will read the same current_version and attempt to recreate the existing tag, so push the generated commit together with its tags.
          git push origin --tags

.github/workflows/release-new-version.yml:63

  • Writing to GITHUB_ENV creates an environment variable for later steps; it does not create steps.get-tag.outputs.VERSION_TAG, and outputs is not a supported key on a run step. Write directly to GITHUB_OUTPUT so the job output is populated.
        run: echo "VERSION_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
        outputs:
          VERSION_TAG: ${{ env.VERSION_TAG }}

.github/workflows/release-new-version.yml:75

  • git describe returns the configured tag including its v prefix (tag_name = "v{new_version}"), so prepending another v asks gh to create a different vv… tag/release. Pass the emitted tag unchanged.
        run: gh release create v${VERSION_TAG} --draft
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/release-new-version.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Authentication, shell syntax, branch pushing, output propagation, and release-tag handling currently prevent successful releases.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (4)

.github/workflows/release-new-version.yml:48

  • This bump cannot complete on a fresh runner: ${ BUMP_TYPE } is invalid shell expansion, and .bumpversion.toml has commit = true, so Git needs the user identity before this command runs rather than in the following step. Configure Git first and use a valid quoted expansion.
      - name: Bump version
        run: bump-my-version bump -v ${ BUMP_TYPE }

.github/workflows/release-new-version.yml:56

  • This pushes only the generated tag, leaving bump-my-version's version commit off the default branch. A subsequent run will check out the old version and attempt to recreate the same tag; push HEAD back to the selected default branch together with the tags.
          git push origin --tags

.github/workflows/release-new-version.yml:74

  • git describe already returns the configured v-prefixed tag, so prepending another v targets vvX.Y.Z. Also, gh release create prompts for title/notes by default and cannot do so in this non-interactive job; pass the tag unchanged and select an automated notes mode.
        run: gh release create v${VERSION_TAG} --draft

.github/workflows/release-new-version.yml:62

  • A run step cannot declare an outputs mapping, and writing to $GITHUB_ENV does not create steps.get-tag.outputs.VERSION_TAG. This leaves the job output unavailable (or makes the workflow invalid); write the value directly to $GITHUB_OUTPUT.
        run: echo "VERSION_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
        outputs:
          VERSION_TAG: ${{ env.VERSION_TAG }}
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .github/workflows/release-new-version.yml
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write

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.

This happened because I was trying to follow zizmor guidance on avoiding persist-credentials: true in actions/checkout. I create a GitHub token and then pass it into the specific steps that I want to have access to it.

@ShrimpCryptid
ShrimpCryptid marked this pull request as ready for review September 16, 2026 23:53
@@ -0,0 +1,99 @@
name: Release new version

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.

@toloudis toloudis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems like a lot of code to do this, but it all makes sense to me

@ShrimpCryptid
ShrimpCryptid merged commit 7294cb5 into main Sep 18, 2026
1 check passed
@ShrimpCryptid
ShrimpCryptid deleted the feat/add-version-bump-workflow branch September 18, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internals new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants