Skip to content

Commit

Permalink
Enable publishing to test PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Aug 10, 2024
1 parent edce33f commit 074abf4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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 ]

Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 074abf4

Please sign in to comment.