From 66bae69308c88dfa11ee38622f9e04dbc59fe461 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 7 Nov 2024 06:13:46 -0600 Subject: [PATCH 1/3] INTPYTHON-406 Allow setting the PyPI repository --- python/publish/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/publish/action.yml b/python/publish/action.yml index 8911c0f..71d998d 100644 --- a/python/publish/action.yml +++ b/python/publish/action.yml @@ -26,6 +26,9 @@ inputs: tag_template: description: The template for the git tag default: "${VERSION}" + repository-url: + description: The PyPI repository URL to use + default: https://upload.pypi.org/legacy/ token: description: The GitHub access token dry_run: @@ -85,6 +88,8 @@ runs: - name: Publish distribution 📦 to PyPI if: inputs.dry_run == 'false' uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: ${{ inputs.repository_url }} - name: Do Not Publish distribution 📦 to PyPI on Dry Run if: inputs.dry_run == 'true' shell: bash From 8569b6463907b6a4e69c45dd076fc1806e2de9f0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 7 Nov 2024 10:48:32 -0600 Subject: [PATCH 2/3] pin publish script --- python/publish/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/publish/action.yml b/python/publish/action.yml index 71d998d..c37f116 100644 --- a/python/publish/action.yml +++ b/python/publish/action.yml @@ -87,7 +87,7 @@ runs: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi - name: Publish distribution 📦 to PyPI if: inputs.dry_run == 'false' - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@v1.11.0 with: repository-url: ${{ inputs.repository_url }} - name: Do Not Publish distribution 📦 to PyPI on Dry Run From e6b08ca379aaa56a453522bbf1dd4c128feb8386 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 7 Nov 2024 11:02:20 -0600 Subject: [PATCH 3/3] add comment --- python/publish/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/python/publish/action.yml b/python/publish/action.yml index c37f116..5216b5d 100644 --- a/python/publish/action.yml +++ b/python/publish/action.yml @@ -87,6 +87,7 @@ runs: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi - name: Publish distribution 📦 to PyPI if: inputs.dry_run == 'false' + # Pinned due to https://github.com/pypa/gh-action-pypi-publish/issues/290 uses: pypa/gh-action-pypi-publish@v1.11.0 with: repository-url: ${{ inputs.repository_url }}