-
Notifications
You must be signed in to change notification settings - Fork 316
[infra] publish rc to pypi as part of release process #1449
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
[infra] publish rc to pypi as part of release process #1449
Conversation
.github/workflows/publish.yml
Outdated
@@ -20,7 +20,9 @@ name: Publish | |||
on: | |||
push: | |||
tags: | |||
- "*" | |||
# Trigger this workflow when tag follows the versioning format: v<major>.<minor>.<patch>-rc.<release_candidate> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9d00a95
to
63cd745
Compare
@@ -28,7 +28,7 @@ env: | |||
rust_msrv: "1.85" | |||
|
|||
concurrency: | |||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |||
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event_name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after changing github.ref
-> github.event.workflow_run.head_branch
in #1444, this was missed.
just a minor improvement
Most important thing here is that for a RC tag push, i.e. For example, |
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun fact! the on.push.tags
syntax here doesnt support regex, its a "filter pattern"
The branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use characters like *, **, +, ?, ! and others to match more than one branch or tag name. If a name contains any of these characters and you want a literal match, you need to escape each of these special characters with \. For more information about glob patterns, see the [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #. ## What changes are included in this PR? See [comment](#1331 (comment)) for context Previously used `cargo-edit` but it does not allow setting version from `0.6.0` -> `0.6.0-rc1`. This PR changes the github action to use `toml-cli` to manually override and set the version in the `binding/python/Cargo.toml` so that we can build pre-release artifacts to push to pypi. <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Yes, similar to #1449 Pushed this PR as the `main` branch in my fork Create a new tag and push to fork to trigger CI ``` git tag "v0.6.0-rc.2" -m "v0.6.0-rc.2" git push kevinjqliu v0.6.0-rc.2 ``` Verify that python artifacts are build correctly with pre-release tag, https://github.com/kevinjqliu/iceberg-rust/actions/runs/16436181005 - downloaded `wheels-sdist`, verified correct version in `PKG-INFO` but not in `Cargo.toml`. I think this is fine - downloaded `wheels-ubuntu-latest-armv7l` and verified the `METADATA` file
Which issue does this PR close?
What changes are included in this PR?
Changes
publish
workflow only by matching specific tag names (v<major>.<minor>.<patch>
orv<major>.<minor>.<patch>-rc.<release_candidate>
) instead of all tagspypi
workflow to again validate the tag namepypi
workflow to override the Cargo version for RC. This allows us to upload to pypi as pre-releaseAre these changes tested?
Yes, tested against personal fork.
Tested
should-not-trigger
. ✅ does not trigger thepublish
jobv0.6.0-rc.1
. ✅ triggerspublish
job andpypi
jobv0.6.0
. ✅ triggerspublish
job andpypi
jobFor both
v0.6.0-rc.1
andv0.6.0
, verified the generated artifacts (wheels-sdist
andwheels-ubuntu-latest-armv7l
) locally for the correctly set python version number.