Skip to content

Commit ccc1c08

Browse files
authored
fix(github): fix github workflow duplicated calls to test pypi (#79)
1 parent 03f3ddd commit ccc1c08

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/pre-release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish release on TestPypi
1+
name: Publish pre-release on TestPyPI
22

33
on:
44
push:
@@ -20,22 +20,22 @@ jobs:
2020
with:
2121
python-version: "3.10"
2222

23-
- name: build release distributions
23+
- name: Build release distributions
2424
run: |
2525
python -m pip install --upgrade pip
2626
pip install build
2727
python -m build
2828
29-
- name: upload windows dists
29+
- name: Upload distributions
3030
uses: actions/upload-artifact@v4
3131
with:
3232
name: release-dists
3333
path: dist/
3434

3535
test-pypi-publish:
3636
runs-on: ubuntu-latest
37-
needs:
38-
- pre-release-build
37+
needs: pre-release-build
38+
if: github.event_name == 'release' && github.event.action == 'prereleased'
3939
permissions:
4040
id-token: write
4141

.github/workflows/release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish release on TestPypi
1+
name: Publish release
22

33
on:
44
push:
@@ -20,22 +20,22 @@ jobs:
2020
with:
2121
python-version: "3.10"
2222

23-
- name: build release distributions
23+
- name: Build release distributions
2424
run: |
2525
python -m pip install --upgrade pip
2626
pip install build
2727
python -m build
2828
29-
- name: upload windows dists
29+
- name: Upload distributions
3030
uses: actions/upload-artifact@v4
3131
with:
3232
name: release-dists
3333
path: dist/
3434

3535
pypi-publish:
3636
runs-on: ubuntu-latest
37-
needs:
38-
- release-build
37+
needs: release-build
38+
if: github.event_name == 'release' && github.event.action == 'published'
3939
permissions:
4040
id-token: write
4141

@@ -51,8 +51,8 @@ jobs:
5151

5252
test-pypi-publish:
5353
runs-on: ubuntu-latest
54-
needs:
55-
- release-build
54+
needs: release-build
55+
if: github.event_name == 'release' && github.event.action == 'published'
5656
permissions:
5757
id-token: write
5858

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ classifiers = [
1717
"Programming Language :: Python :: 3.12",
1818
"Programming Language :: Python :: 3.13",
1919
]
20-
version = "1.2.3"
20+
version = "1.2.4"
2121
requires-python = ">=3.10"
2222
dependencies = [
2323
"requests>=2.32, < 3",

0 commit comments

Comments
 (0)