Publish Python π distributions π¦ #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |