Skip to content

ci: simplify uv-based CI and release workflows - #157

Closed
jakob1379 wants to merge 3 commits into
Maxteabag:mainfrom
jakob1379:fix/packaging
Closed

ci: simplify uv-based CI and release workflows#157
jakob1379 wants to merge 3 commits into
Maxteabag:mainfrom
jakob1379:fix/packaging

Conversation

@jakob1379

@jakob1379 jakob1379 commented Mar 8, 2026

Copy link
Copy Markdown

just a cleanup and tightening of the CI.

Things done:

  • Use setup-uv + uv sync/build/publish
  • tighten release flow around tag-based trusted publishing,
  • pin workflow actions to latest major versions

Jakob Guldberg Aaes and others added 3 commits March 8, 2026 06:55
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.
@Maxteabag

Copy link
Copy Markdown
Owner

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 dist/ artifact is instant and equivalent since PyPI serves exactly what we upload.

Was there any particular reason you changed it to downloading via curl?

@jakob1379

jakob1379 commented Mar 20, 2026

Copy link
Copy Markdown
Author

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 😁

@jakob1379

Copy link
Copy Markdown
Author

would still consider merging this? @Maxteabag

@Maxteabag

Copy link
Copy Markdown
Owner

Yes, I've delayed it because I saw some things that concerned me. But I am going to have to have a closer look.

@jakob1379

Copy link
Copy Markdown
Author

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 :)

@jakob1379

jakob1379 commented May 23, 2026

Copy link
Copy Markdown
Author
      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 is pretty great for managing this too

❯ 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

@jakob1379

jakob1379 commented Aug 7, 2026

Copy link
Copy Markdown
Author

@Maxteabag is this still relevant, should I rebase or close?

Maxteabag commented Aug 10, 2026

Copy link
Copy Markdown
Owner

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:

  • The AUR job reads the version from steps.version, but the step in that job is called info. It also reads the checksum from steps.info, although the checksum is produced by the pypi step. That leaves both values empty.
  • A manual workflow_dispatch skips the tag-only publish job, but the AUR job still runs and tries to download the artifact that the skipped job would have created.
  • I tested the constructed PyPI source URL against the existing 1.6.0 release and got a 404. Since the later curl does not use --fail, it could hash an error response and use that as the AUR checksum.
  • KSXGitHub/github-actions-deploy-aur@v4 is not an available tag. Fully versioned tags such as v4.2.0 do exist.

Maxteabag commented Aug 10, 2026

Copy link
Copy Markdown
Owner

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!

@Maxteabag Maxteabag closed this Aug 10, 2026
@jakob1379

Copy link
Copy Markdown
Author

i'll gladly rebase/remake, not really an issue :) I might have a look at how everything looks now and reconsider :)

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.

2 participants