Skip to content

build artifact and publish to PyPi #52

build artifact and publish to PyPi

build artifact and publish to PyPi #52

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 }}