| 1 |
name: release to test.pypi.org |
| 2 |
|
| 3 |
"on": |
| 4 |
push: |
| 5 |
tags: |
| 6 |
# To publish a test release to test.pypi.org, |
| 7 |
# create and push a tag as follows: |
| 8 |
# git tag -a 0.21.3.rc1 -m "Tag 0.21.3.rc1 for release to test.pypi.org" |
| 9 |
# git push --tags |
| 10 |
# Go to https://github.com/jab/bidict/actions?query=workflow%3A%22Release+to+Test+PyPI%22 |
| 11 |
# and watch for a new run of this workflow to publish to test.pypi.org. |
| 12 |
# IMPORTANT: Run the following to clean up after: |
| 13 |
# git tag -d 0.21.3.rc1 |
| 14 |
# git push origin :0.21.3.rc1 |
| 15 |
- "[0-9]+.[0-9]+.[0-9]+.rc[0-9]+" |
| 16 |
workflow_dispatch: |
| 17 |
|
| 18 |
jobs: |
| 19 |
main: |
| 20 |
runs-on: ubuntu-latest |
| 21 |
steps: |
| 22 |
- name: check out source |
| 23 |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
| 24 |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c |
| 25 |
with: |
| 26 |
python-version: '3.12' |
| 27 |
- run: python -m pip install -U pip setuptools build |
| 28 |
- run: python -m build |
| 29 |
- name: Publish |
| 30 |
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf |
| 31 |
with: |
| 32 |
user: __token__ |
| 33 |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} |
| 34 |
repository_url: https://test.pypi.org/legacy/ |
| 35 |
verbose: true |
| 36 |
|
| 37 |
permissions: |
| 38 |
contents: read |