mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 20:01:05 -05:00
CI: Simplify test PyPI release
Allow releasing to Test PyPI by setting GitHub environment "release" variable `PYPI_REPOSITORY_URL` to `https://test.pypi.org/legacy/`. Also ensure twine-upload doesn't try to prompt for credentials, and turn off upload progress bar.
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -59,8 +59,11 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TWINE_USERNAME: __token__
|
TWINE_USERNAME: __token__
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
# For test PyPI, set release var PYPI_REPOSITORY_URL=https://test.pypi.org/legacy/.
|
||||||
|
# For production PyPI, leave unset (or set to empty string).
|
||||||
|
TWINE_REPOSITORY_URL: ${{ vars.PYPI_REPOSITORY_URL }}
|
||||||
run: |
|
run: |
|
||||||
python -m twine upload dist/*
|
python -m twine upload --disable-progress-bar --non-interactive dist/*
|
||||||
|
|
||||||
- name: Release to GitHub
|
- name: Release to GitHub
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user