Skip to content

Publish Python 🐍 distributions πŸ“¦ #55

Publish Python 🐍 distributions πŸ“¦

Publish Python 🐍 distributions πŸ“¦ #55

name: Publish Python 🐍 distributions πŸ“¦
on:
workflow_dispatch:
inputs:
publish_testpypi:
type: boolean
default: false
description: Publish to TestPyPI
publish_pypi:
type: boolean
default: false
description: Publish to PyPI
publish_gh_release:
type: boolean
default: true
description: Publish to GitHub Release
use_changelog:
type: boolean
default: true
description: Extract release notes from CHANGELOG.md
changelog_file:
type: string
default: CHANGELOG.md
description: Path to changelog file
required: false
release_tag:
type: string
description: Tag to package (empty for latest tag)
required: false
jobs:
test:
uses: ./.github/workflows/test.yml
build-n-publish:
needs: test
uses: atomiechen/reusable-workflows/.github/workflows/publish-python-distributions.yml@main
with:
publish_testpypi: ${{ inputs.publish_testpypi }}
publish_pypi: ${{ inputs.publish_pypi }}
publish_gh_release: ${{ inputs.publish_gh_release }}
use_changelog: ${{ inputs.use_changelog }}
changelog_file: ${{ inputs.changelog_file }}
release_tag: ${{ inputs.release_tag }}
secrets:
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}