Skip to content

Commit 0f7bca6

Browse files
committed
rm publsih on release
1 parent 0641f2e commit 0f7bca6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/publish.yml

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

33
on:
4-
release:
5-
types: [published]
64
workflow_dispatch:
75
inputs:
86
environment:
@@ -18,8 +16,8 @@ jobs:
1816
publish:
1917
runs-on: ubuntu-latest
2018
environment:
21-
name: ${{ github.event_name == 'release' && 'pypi' || github.event.inputs.environment }}
22-
url: ${{ github.event_name == 'release' && 'https://pypi.org/p/wav2aug' || 'https://test.pypi.org/p/wav2aug' }}
19+
name: ${{ github.event.inputs.environment }}
20+
url: ${{ github.event.inputs.environment == 'pypi' && 'https://pypi.org/p/wav2aug' || 'https://test.pypi.org/p/wav2aug' }}
2321
permissions:
2422
id-token: write
2523
contents: read
@@ -39,14 +37,14 @@ jobs:
3937
run: uv build
4038

4139
- name: Publish to Test PyPI
42-
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
40+
if: github.event.inputs.environment == 'testpypi'
4341
uses: pypa/gh-action-pypi-publish@release/v1
4442
with:
4543
repository-url: https://test.pypi.org/legacy/
4644
verbose: true
4745

4846
- name: Publish to PyPI
49-
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi')
47+
if: github.event.inputs.environment == 'pypi'
5048
uses: pypa/gh-action-pypi-publish@release/v1
5149
with:
5250
verbose: true

0 commit comments

Comments
 (0)