Repository navigation
ci: publish DB12 to PyPI via trusted publisher - #18
Merged
Merged
Conversation
…3.11 for pre-commit
fstagni
marked this pull request as ready for review
November 14, 2026 20:28
This was referenced Nov 14, 2026
aldbr
requested changes
Nov 16, 2026
Commit 3fd6127 replaced setup.py with a bare setup() and dropped use_scm_version, so any build after 1.0.4 is versioned 0.0.0. With the trusted publisher in place, the next tag would upload DB12 0.0.0 to PyPI. Restore use_scm_version and declare setuptools_scm in [build-system]. A tagged build now gives the tag (1.0.5 -> db12-1.0.5), also from the shallow checkout actions/checkout does on a tag push. The wheel contains the same files as 1.0.4. Assisted-by: Claude:claude-opus-5-5
The step had no id, nothing read its outputs and it ran after the build, so it could not skip anything. It needs actions permissions the job no longer grants (contents: read only): its listWorkflowRuns call is not wrapped in a try, so a 403 would fail the build job and block publish. It was also the last action pinned to a mutable @master. Also use the canonical skip-existing input name (skip_existing is a deprecated alias in gh-action-pypi-publish). Assisted-by: Claude:claude-opus-5-5
Initialising start/end for pylint made iterations_num=0 return NORM=0 (and a negative CPU time with measured copies) where it used to raise. Raise a ValueError up front; for valid inputs the result is unchanged. Assisted-by: Claude:claude-opus-5-5
- Pin actions/checkout (v7.0.1) and actions/setup-python (v7.1.0) by SHA, like the other actions in the workflow. The v2 tags targeted an old Node runtime and were force-run on Node 24 with a deprecation warning. - Set python-version explicitly instead of the implicit 3.x default. - Label the pypi-publish SHA with its tag (v1.14.3) instead of the moving release/v1 branch. - Drop the redundant needs.build.result check: a job with needs only runs when its dependencies succeeded. Assisted-by: Claude:claude-opus-5-5
aldbr
approved these changes
Nov 16, 2026
aldbr
approved these changes
Nov 16, 2026
fstagni
added a commit
to fstagni/DB12
that referenced
this pull request
Nov 16, 2026
…drop skip-duplicate-actions (removed in DIRACGrid#18)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of DIRACGrid/.github#5 (PyPI releases / trusted publisher instead of
PYPI_TOKEN), same as DIRACGrid/DIRAC#8886.pypi-publish.ymlis split in two:buildbuilds the wheel/sdist, uploads them as an artifact on tag pushes, and needs no PyPI credential (permissions: {}at workflow level,contents: readfor the job). The duplicatedcheckoutstep is removed.publishdownloads the packages and publishes them with trusted publishing (environment: pypi,id-token: write), same as already done indiracx,intercedeandsignurlarity.PYPI_API_TOKENis dropped entirely, andpypa/gh-action-pypi-publishis pinned to the same commit SHA used in the other DIRACGrid repos (it was on the mutablemasterbranch).skip_existingis kept.Required follow-ups before the next release (manual):
pypienvironment on this repository (no reviewers needed)DB12project: workflowpypi-publish.yml, environmentpypi, owner DIRACGrid