diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9679250..489ebbb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,15 @@ name: Release on: workflow_dispatch: + inputs: + pypi: + description: 'PyPI instance' + required: true + type: choice + default: 'production' + options: + - production + - testing push: branches: [ release ] @@ -11,6 +20,8 @@ concurrency: env: PYTHON_RUNTIME_VERSION: "3.11" PYTHON_PACKAGE_NAME: netboxlabs-netbox-branching + PYPI_URL_PRODUCTION: "https://upload.pypi.org/legacy/" + PYPI_URL_TESTING: "https://test.pypi.org/legacy/" jobs: get-package-name: @@ -95,6 +106,7 @@ jobs: - name: Publish release distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: + repository-url: ${{ github.event.inputs.pypi == 'production' && env.PYPI_URL_PRODUCTION || env.PYPI_URL_TESTING }} packages-dir: dist release: name: Release