Skip to content

DEVOPS-1154: [WIP] Devops 1154 - #216

Open
RomFloreani wants to merge 5 commits into
mainfrom
DEVOPS-1154
Open

DEVOPS-1154: [WIP] Devops 1154#216
RomFloreani wants to merge 5 commits into
mainfrom
DEVOPS-1154

Conversation

@RomFloreani

@RomFloreani RomFloreani commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

DEVOPS-1154 - address warnings upon publishing Python packages from GitHub

testing with MiraGeoscience/simpeg#166

Copilot AI lite review requested due to automatic review settings August 13, 2026 15:13
@github-actions github-actions Bot changed the title [WIP] Devops 1154 DEVOPS-1154: [WIP] Devops 1154 Aug 13, 2026

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.

Pull request overview

This PR appears to transition PyPI publishing from token-based uploads inside reusable workflows to an OIDC “trusted publishing” approach by introducing a composite action and removing the direct pypa/gh-action-pypi-publish steps from the reusable workflows.

Changes:

  • Removed the “Publish package to PyPI” step from two reusable workflows that previously published to PyPI/TestPyPI.
  • Added a new composite action (reusable-python-publish_to_pypi) intended to publish distributions to PyPI/TestPyPI via trusted publishing, supporting artifact or release-asset sources.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/reusable-python-release_pypi_assets.yml Removes the PyPI/TestPyPI publish step from the release-asset publishing workflow.
.github/workflows/reusable-python-publish_pypi_package.yml Removes the PyPI/TestPyPI publish step from the package publish workflow.
.github/actions/reusable-python-publish_to_pypi/action.yml Adds a composite action to publish to PyPI/TestPyPI using OIDC trusted publishing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 69 to 71
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ inputs.release-tag }}
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

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.

suggestion: report error on attempts to publish to pypi / test-pypi

as suggested by Copilot

Comment on lines +5 to +8
Must be invoked as a step in a job defined directly in the caller's own
top-level workflow file (not from within a reusable *workflow*), so the
OIDC token's workflow_ref matches the repository's configured PyPI
trusted publisher.
Comment on lines 139 to 141
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ env.version }}
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

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.

suggestion: report error on attempts to publish to pypi / test-pypi

as suggested by Copilot

Comment on lines +47 to +53
- name: Download build artifact
if: ${{ inputs.source == 'artifact' }}
uses: actions/download-artifact@v8
with:
name: ${{ inputs.artifact-name }}
path: dist-download
- name: Download release assets
@RomFloreani
RomFloreani requested a review from sebhmg August 24, 2026 13:39
@github-actions

Copy link
Copy Markdown

⚠️ Force push detected - Previous Copilot review comments may no longer be relevant to the current code. Please resolve any outdated threads and re-request a Copilot review when ready.

@sebhmg sebhmg 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.

suggestion: have 2 different simpler actions instead of bundling 2 uses-case into one action

Comment on lines 69 to 71
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ inputs.release-tag }}
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

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.

suggestion: report error on attempts to publish to pypi / test-pypi

as suggested by Copilot

Comment on lines 139 to 141
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ env.version }}
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

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.

suggestion: report error on attempts to publish to pypi / test-pypi

as suggested by Copilot

Comment on lines +9 to +27
source:
description: 'Where to fetch the built packages from: "artifact" or "release"'
required: true
type: string
artifact-name:
description: 'Name of the workflow artifact to download. Required when source is "artifact"'
required: false
type: string
default: ''
release-tag:
description: 'Tag of the GitHub release to download assets from. Required when source is "release"'
required: false
type: string
default: ''
github-token:
description: 'Token used to download release assets via "gh release download". Required when source is "release"'
required: false
type: string
default: ''

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.

suggestion: keep tow different actions: one for release, one for build artifact

within this single action, there is extra complexity with the requirement on expect params depending on value of source, and parsm being exclusive

As use case as separeted, having 2 different actions seem to make sense: publishing to prod will always fetch from release, while publishing to dev will always fetch from build.

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.

3 participants