Skip to content

Commit d397663

Browse files
committed
implement new workflow (step 2)
1 parent cdda357 commit d397663

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Release
22

33
on:
4-
release:
5-
types: [published]
64
workflow_dispatch:
75
inputs:
86
use-testpypi:
@@ -34,7 +32,7 @@ jobs:
3432
python -m build
3533
3634
- name: Verify version is final (production target only)
37-
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.use-testpypi) }}
35+
if: ${{ !inputs.use-testpypi }}
3836
run: |
3937
VERSION=$(ls dist/*.tar.gz | sed -E 's|.*-(.*)\.tar\.gz|\1|')
4038
echo "Built version: $VERSION"
@@ -45,5 +43,5 @@ jobs:
4543
- name: Publish
4644
uses: pypa/gh-action-pypi-publish@release/v1
4745
with:
48-
repository-url: ${{ (github.event_name == 'workflow_dispatch' && inputs.use-testpypi) && 'https://test.pypi.org/legacy/' || '' }}
46+
repository-url: ${{ inputs.use-testpypi && 'https://test.pypi.org/legacy/' || '' }}
4947
skip-existing: true

0 commit comments

Comments
 (0)