build artifact and publish to PyPi #47
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: build artifact and publish to PyPi | |
on: | |
# whenever version is bumped, or allow manual runs | |
workflow_dispatch: | |
inputs: | |
deploy_to_test: | |
type: boolean | |
description: 'Deploy to PyPi test' | |
required: false | |
default: false | |
workflow_run: | |
workflows: ["bump version"] | |
types: | |
- completed | |
jobs: | |
build_artifacts: | |
uses: ./.github/workflows/deploy_build_artifact.yaml | |
# output: | |
# artifact-url: | |
# artifact-id: | |
# package-version: | |
# artifact-name: | |
deploy_to_pypi_test: | |
needs: [build_artifacts] | |
if: ${{ github.event.inputs.deploy_to_test == true }} | |
uses: ./.github/workflows/deploy_to_pypi.yml | |
with: | |
package-version: ${{ needs.build_artifacts.outputs.package-version }} | |
target-environment: 'pypi-test' | |
artifact-name: ${{ needs.build_artifacts.outputs.artifact-name }} | |
deploy_to_pypi_prod: | |
needs: [build_artifacts] | |
uses: ./.github/workflows/deploy_to_pypi.yml | |
with: | |
package-version: ${{ needs.build_artifacts.outputs.package-version }} | |
target-environment: 'pypi-prod' | |
artifact-name: ${{ needs.build_artifacts.outputs.artifact-name }} |