Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass currentVersion in release workflow #70

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Aug 23, 2024

Problem

I tried running the new release action and it errored when trying to push to main and when generating the new version tag due to 3 things:

  • main branch doesn't allow pushes without PRs, we need to disable that to allow more flexibility from CI (we do this in the python and typescript repos).
  • The currentVersion retrieved using git describe was not being passed to the bump-version action, so we ended up with NaN in the output.
  • The prereleaseSuffix defaulting to "alpha1" and then being passed to bump-version was an issue because it was being appended whether or not isPrerelease was true.

Failed run: https://github.com/pinecone-io/go-pinecone/actions/runs/10529783970/job/29178282163

Solution

  • Add explicit SEMVER_VERSION and PRERELEASE_SUFFIX variables to the release workflow. Make sure these values are set in the get_tag_version and set_prerelease_suffix steps.
  • Pass the currentVersion value to bump-version properly.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Push changes up and rerun the version bump.

Comment on lines -62 to +70
versionFile: pinecone/__version__
currentVersion: ${{ env.SEMVER_VERSION}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy/pasta mistake from the original workflow I used as a template. The underlying bump-version action seems to work as expected and is unit tested, I just wasn't passing the proper input.

Copy link
Contributor

@jhamon jhamon left a comment

Choose a reason for hiding this comment

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

👍

@austin-denoble austin-denoble merged commit b66ad78 into main Aug 23, 2024
3 checks passed
@austin-denoble austin-denoble deleted the adenoble/fix-release-workflow-pt-2 branch August 23, 2024 21:47
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.

3 participants