Skip to content

ci: use GITHUB_TOKEN for release-please and publish with the pypi environment - #1187

Open
fstagni wants to merge 2 commits into
DIRACGrid:mainfrom
fstagni:release-github-token
Open

fstagni wants to merge 2 commits into
DIRACGrid:mainfrom
fstagni:release-github-token

Conversation

@fstagni

@fstagni fstagni commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to DIRACGrid/intercede#41 and DIRACGrid/signurlarity#66, part of DIRACGrid/.github#5 (PyPI releases bullet).

deployment.yml and release-please.yml are merged into a single deployment.yml, because tags created with GITHUB_TOKEN trigger no workflows, so the publish has to happen in the same run that creates the release:

  • release-please.yml is deleted; its release-please job (now using the default GITHUB_TOKEN instead of MY_RELEASE_PLEASE_TOKEN) and its release-env job (diracx.env release asset) move into deployment.yml.
  • deployment.yml triggers on push to main (replacing the v* tag trigger) and gains a workflow_dispatch input to re-publish an existing tag after a failed publish.
  • deploy-pypi is split into build (no special permissions) and publish (environment pypi, id-token: write, trusted publishing, PEP 740 attestations). The overly broad permissions block of the old deploy-pypi job is reduced to what is actually needed.
  • docker and update-charts are unchanged apart from following the deploy-pypi → build rename.

Required follow-ups before the next release (manual):

  • create the pypi environment on this repository (no reviewers needed)
  • update the PyPI trusted publisher of every diracx* package to reference workflow deployment.yml with environment pypi (previously no environment was set)
  • verify with a release

@read-the-docs-community

read-the-docs-community Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

@fstagni
fstagni marked this pull request as ready for review November 13, 2026 15:13
- docker and update-charts get explicit result checks, so a skipped
  release-please no longer skips them on PRs, schedule and dispatch.
- docker checks out the release tag: the image build copies .git and
  hatch-vcs otherwise versions release images as 0.1.devN.
- docker needs a successful publish on releases, so images and the chart
  bump are not pushed while the PyPI upload awaits approval or failed.
- concurrency moves from the workflow to the release-please and publish
  jobs, so a publish waiting for approval does not hold later pushes.
- publish uses skip-existing so a re-publish after a partial upload works.
- build does not treat a failed release-please as "not a release".
- a dispatched tag must be a v* tag on the checked-out commit.

Assisted-by: Claude:claude-opus-5-5
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