Skip to content

Commit aa9f8dd

Browse files
committed
x
1 parent 91fbb72 commit aa9f8dd

4 files changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/publish-dev.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
version: '${{ github.run_number }}.0.0'
1919
repository: testpypi
2020
secrets:
21-
twine_username: ${{ secrets.TESTPYPI_USERNAME }}
22-
twine_password: ${{ secrets.TESTPYPI_TOKEN }}
21+
twine_token: ${{ secrets.TESTPYPI_TOKEN }}
2322

2423
build_image:
2524
# TODO: remove this entire job if an image does not make sense (ie: just a library, no CLI)

.github/workflows/publish-main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ jobs:
1212
# so easy to forget bumping the version to match the tag, just override it!
1313
version: ${{ github.ref_name }}
1414
secrets:
15-
twine_username: ${{ secrets.PYPI_USERNAME }}
16-
twine_password: ${{ secrets.PYPI_TOKEN }}
15+
twine_token: ${{ secrets.PYPI_TOKEN }}
1716

1817
build_image:
1918
# TODO: remove this entire job if an image does not make sense (ie: just a library, no CLI)

.github/workflows/publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ on:
1010
default: pypi
1111
type: string
1212
secrets:
13-
twine_username:
14-
required: true
15-
twine_password:
13+
twine_token:
1614
required: true
1715
workflow_dispatch:
1816
inputs:
@@ -58,8 +56,8 @@ jobs:
5856
run: uv run pyproject-build
5957
- name: Publish
6058
env:
61-
TWINE_USERNAME: ${{ secrets.twine_username || secrets.PYPI_USERNAME }}
62-
TWINE_PASSWORD: ${{ secrets.twine_password || secrets.PYPI_TOKEN }}
59+
TWINE_USERNAME: __token__
60+
TWINE_PASSWORD: ${{ secrets.twine_token || secrets.PYPI_TOKEN }}
6361
run: |
6462
uv run pyproject-build
6563
uv run twine upload --verbose --repository ${{ inputs.repository }} dist/*

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
* [ ] Replace folder `example` with the actual package
2020
* [ ] Replace `LICENSE` if MIT does not apply
2121
* [ ] Search the project for `# TODO` to find the (minimum list of) places that need to be changed.
22-
* [ ] Add PYPI credentials to secrets
23-
* `PYPI_USERNAME` and `PYPI_TOKEN` to publish tags to pypi
24-
* `TESTPYPI_USERNAME` and `TESTPYPI_TOKEN` to publish dev branches to testpypi
25-
* [ ] Add [codecov](https://app.codecov.io/github/fopina/) token
22+
* [ ] Add PYPI tokens to secrets
23+
* `PYPI_TOKEN` to publish tags to pypi
24+
* `TESTPYPI_TOKEN` to publish dev branches to testpypi
25+
* [ ] Add [codecov](https://app.codecov.io/github/fopina/) token or enable global tokenless uploads in your profile
2626
* `CODECOV_TOKEN` taken from link above
2727
* [ ] Replace this README.md - template below
2828

0 commit comments

Comments
 (0)