Skip to content

Commit 5179e27

Browse files
add username
1 parent 3398fcc commit 5179e27

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212

1313
publish:
1414
runs-on: ubuntu-latest
15+
if: github.ref == 'refs/heads/main'
1516
env:
17+
TWINE_USERNAME: "__token__"
1618
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
1719
TWINE_REPOSITORY_URL: "https://pypi.org/simple/"
1820
steps:

.github/workflows/publish_test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ env:
66
on:
77
push:
88
tags:
9-
- '*'
9+
- 'v*'
1010

1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14+
if: github.ref != 'refs/heads/main'
1415
env:
16+
TWINE_USERNAME: "__token__"
1517
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
1618
TWINE_REPOSITORY_URL: "https://test.pypi.org/simple/"
1719
steps:

0 commit comments

Comments
 (0)