Skip to content

refactor(publish): split the workflow in multiple jobs - #173

Merged
Michael Matzka (mima0815) merged 1 commit into
mainfrom
refactor/publishjobsplit
Sep 9, 2026
Merged

Michael Matzka (mima0815) merged 1 commit into
mainfrom
refactor/publishjobsplit

Conversation

@mima0815

@mima0815 Michael Matzka (mima0815) commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Split the publish.yml deploy job into two jobs — deploy (PyPI) and publish-conda (Anaconda) — so that pre-release (beta) versions can be published to PyPI without also being pushed to Anaconda's main label.

Previously, every published GitHub release (including pre-releases) ran the same job, which always uploaded to Anaconda's main label — the label a plain conda install fds.sdk.utils resolves to. That's fine for stable releases, but a beta version has no business being handed to every conda user with no opt-in, unlike PyPI where pre-release versions are already excluded by default (pip install --pre or an exact == pin is required to get one).

Changes:

  • publish-conda is a separate job with needs: deploy and if: ${{ !github.event.release.prerelease }}, so it's skipped entirely when the triggering release is marked as a pre-release.
  • deploy now only builds and publishes to PyPI (uv build / uv publish); the Anaconda-only env vars (ANACONDA_TOKEN, CONDA_ENV_NAME) and the "Setup Conda" / "Publish to Anaconda" steps moved to publish-conda, which checks out the repo again since jobs run on independent runners.
  • Added an explicit permissions: contents: read at the workflow level — neither job needs more than that (checkout only; PyPI/Anaconda publishing use their own secrets, not GITHUB_TOKEN), so this pins it down instead of relying on the org/repo default.

To publish a beta going forward: bump version in pyproject.toml to a PEP 440 pre-release (e.g. 3.1.0b1), tag it (e.g. v3.1.0b1), and create a GitHub Release with "Set as a pre-release" checked.

Links

N/A

Testing

  • This workflow only runs on an actual GitHub release publish event, so it can't be exercised locally — verification is a real pre-release and a real stable release once merged.

Checklist

  • Follows all project developer guide and coding standards.
  • Tests have been written for the change, when applicable. (N/A — GitHub Actions workflow, no unit test coverage applies)
  • Confidential information (credentials, auth tokens, etc...) is not included.

@mima0815
Michael Matzka (mima0815) requested a review from a team as a code owner September 8, 2026 10:30
@RicoFactset

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailse5dcde01-d7a8-49fe-9352-63ec953f4a7e

Great job! No new security vulnerabilities introduced in this pull request


Communicate with Checkmarx by submitting a PR comment with Checkmarx (@Checkmarx) followed by one of the supported commands. Learn about the supported commands here.

@dgawande12 Dhawal (dgawande12) 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.

Nice!

@mima0815
Michael Matzka (mima0815) merged commit f270f02 into main Sep 9, 2026
9 checks passed
@mima0815
Michael Matzka (mima0815) deleted the refactor/publishjobsplit branch September 9, 2026 09:21
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.

4 participants