Skip to content

Commit

Permalink
enhance the target input
Browse files Browse the repository at this point in the history
  • Loading branch information
phith0n committed Sep 4, 2023
1 parent bc70946 commit c7dc8b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
description: "The branch, tag or SHA to release from"
required: true
default: "master"
dry:
description: "Only publish the release to the test environment"
required: false
default: "false"
target:
description: "Which environment(test/live/all) should be published"
required: true
default: "all"

jobs:
build_wheels:
Expand Down Expand Up @@ -73,9 +73,10 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
if: ${{ github.event.inputs.target == 'all' || github.event.inputs.target == 'test' }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
if: ${{ github.event.inputs.dry != 'true' }}
if: ${{ github.event.inputs.target == 'all' || github.event.inputs.target == 'live' }}

0 comments on commit c7dc8b5

Please sign in to comment.