ci: simplify uv-based CI and release workflows - #157
Conversation
Use setup-uv + uv sync/build/publish end-to-end, tighten release flow around tag-based trusted publishing, and pin workflow actions to major versions for safer automatic patch updates.
|
Thanks for the cleanup! The YAML anchors, action version bumps, and permissions tightening all look great. The checksum computation in the release workflow switched from checksumming the local build artifact to downloading from PyPI first via curl. We previously had it that way and moved away from it because it made releases slow (waiting for PyPI to be ready). The current approach of checksumming the local Was there any particular reason you changed it to downloading via curl? |
|
Mainly to ensure it exists on pypi as I have often found myself ending up making releases on GH successfully, but then some failing CI did not push to PyPi, so I have preferred the other way around. So either a release exists everywhere or nowhere. I'll gladly accommodate changes if you prefer something else. If you have setup this repo as trusted on pypi this can further be slimmed down 😁 |
|
would still consider merging this? @Maxteabag |
|
Yes, I've delayed it because I saw some things that concerned me. But I am going to have to have a closer look. |
Feel free to throw any concerns or questions at me :) |
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_TAG }}
- name: Extract version from tag
id: version
run: |
echo "TAG=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "VERSION=${RELEASE_TAG#v}" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.TAG }}
name: ${{ steps.version.outputs.TAG }}
generate_release_notes: true
draft: false
prerelease: false
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_TAG }}would it not be better if we used the pyproject.toml as the source of truth for the version number instead of the tag number?
❯ uv version --help
Read or update the project's version
Usage: uv version [OPTIONS] [VALUE]
Arguments:
[VALUE] Set the project version to this value
Options:
--bump <BUMP[=VALUE]> Update the project version using the given semantics [possible values: major, minor, patch, stable, alpha, beta, rc, post, dev]
--dry-run Don't write a new version to the `pyproject.toml`
--short Only show the version
--output-format <OUTPUT_FORMAT> The format of the output [default: text] [possible values: text, json]
--no-sync Avoid syncing the virtual environment after re-locking the project [env: UV_NO_SYNC=]
--active Prefer the active virtual environment over the project's virtual environment
--locked Assert that the `uv.lock` will remain unchanged [env: UV_LOCKED=]
--frozen Update the version without re-locking the project [env: UV_FROZEN=]
--package <PACKAGE> Update the version of a specific package in the workspace |
|
@Maxteabag is this still relevant, should I rebase or close? |
|
Sorry for the slow response, I took a closer look. The CI cleanup is still useful, so I’d prefer a rebase rather than closing this, but I don’t think the current version is safe to merge as-is. I fetched the PR head and traced the release jobs and their outputs, then checked the external URLs/action refs directly. A few concrete problems came up:
|
|
Thanks again for putting this together. After looking at how much the release workflow and main have changed since this was opened, I think the best option is to close this rather than ask you to spend time rebasing the whole thing. There are several separate ideas bundled together here: CI deduplication, action upgrades, permissions changes, publishing changes, and AUR handling. I’d prefer that we take those on as smaller, focused changes one at a time. That will make each change easier to verify and reduce the risk around the release process. I appreciate the work and the ideas behind the cleanup! |
|
i'll gladly rebase/remake, not really an issue :) I might have a look at how everything looks now and reconsider :) |
just a cleanup and tightening of the CI.
Things done: