Skip to content

Combine the packaging and PyPI workflows into release.yml - #529

Open
jacalata wants to merge 1 commit into
developmentfrom
jac/combine-release-workflows
Open

jacalata wants to merge 1 commit into
developmentfrom
jac/combine-release-workflows

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

Publishing a release needed three approvals: a Test PyPI run on the pypi environment, the PyPI upload on the pypi environment, and attaching the binaries on the release environment. This merges package.yml and publish-pypi.yml into release.yml, so publishing needs one approval and Test PyPI needs none.

How it works

  • On release: published, buildexe builds the executables and build_dist builds the wheel and sdist. Neither is gated.
  • upload_to_release and publish_pypi both use the release environment. One reviewer approval covers both.
  • publish_pypi needs buildexe, so PyPI is only published when the executables built.
  • Test PyPI is the manual target=test-pypi job. It has no environment and no approval.
  • workflow_dispatch takes target: all, binaries (re-attach executables), pypi (publish without a release) or test-pypi. It replaces the is_draft input.

When it takes effect

  • GitHub dispatches workflows from main only, so release.yml works from the next merge of development into main. Until then the old publish-pypi.yml on main still gates Test PyPI.

Things to know

  • Anyone with write access can now dispatch target=test-pypi and upload a branch build to Test PyPI without approval.
  • PYPI_API_TOKEN is a repository secret, so a workflow on any branch can read it. The environment approval gates this workflow but does not protect the token. Moving the token to the release environment would fix that. It is a settings change and not part of this PR.
  • gh workflow run package.yml no longer exists; contributing.md has the new commands. The concurrency group is renamed to publish-…, and the smoke tests in python-app.yml now follow "Publish release".

Needs checking on the first run

  • One approval is expected to release both jobs, because they share an environment. It hasn't been seen yet.
  • After the release merge to main, dispatch target=test-pypi to check the Test PyPI job.

After merging, a repo admin should

  • delete the unused pypi environment;
  • consider moving PYPI_API_TOKEN into the release environment.

prevent_self_review stays on release, so whoever publishes still can't approve.

🤖 Generated with Claude Code

Publishing a release needed two approvals, one on the release environment
for the binaries and one on the pypi environment for PyPI. release.yml runs
both from the release: published event. upload_to_release and publish_pypi
share the release environment, so one reviewer approval covers both, and
PyPI is only published when the executables built.

The Test PyPI upload is the manual target=test-pypi and has no environment,
so it needs no approval. workflow_dispatch also takes target=all, binaries
or pypi to repair or publish by hand.

The smoke tests workflow now follows Publish release, and release-on-merge
and contributing.md describe the new flow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py121212 0%
   _version.py111111 0%
   tabcmd.py151515 0%
   version.py1066 40%
tabcmd/commands
   commands.py101010 0%
   constants.py771515 81%
   server.py1351818 87%
tabcmd/commands/auth
   session.py4434444 90%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1701818 89%
   datasources_workbooks_views_url_parser.py14255 96%
   delete_command.py702323 67%
   export_command.py1262121 83%
   get_url_command.py1274747 63%
   publish_command.py1341616 88%
   runschedule_command.py2177 67%
tabcmd/commands/extracts
   create_extracts_command.py4288 81%
   decrypt_extracts_command.py2722 93%
   delete_extracts_command.py3766 84%
   encrypt_extracts_command.py2722 93%
   extracts.py2022 90%
   reencrypt_extracts_command.py2722 93%
   refresh_extracts_command.py481010 79%
tabcmd/commands/group
   create_group_command.py2955 83%
   delete_group_command.py2722 93%
tabcmd/commands/project
   create_project_command.py4688 83%
   delete_project_command.py3544 89%
   publish_samples_command.py3044 87%
tabcmd/commands/site
   create_site_command.py3455 85%
   delete_site_command.py2722 93%
   edit_site_command.py661818 73%
   list_command.py771212 84%
   list_sites_command.py2922 93%
tabcmd/commands/user
   add_users_command.py2955 83%
   create_site_users.py1151414 88%
   create_users_command.py5999 85%
   delete_site_users_command.py4355 88%
   user_data.py2303030 87%
tabcmd/execution
   _version.py222 0%
   global_options.py15544 97%
   localize.py671111 84%
   logger_config.py7266 92%
   tabcmd_controller.py4077 82%
TOTAL309745585% 

This branch has not been deployed

No deployments
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