release to test.pypi.org #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release to test.pypi.org | |
"on": | |
push: | |
tags: | |
# To publish a test release to test.pypi.org, | |
# create and push a tag as follows: | |
# git tag -a 0.21.3.rc1 -m "Tag 0.21.3.rc1 for release to test.pypi.org" | |
# git push --tags | |
# Go to https://github.com/jab/bidict/actions?query=workflow%3A%22Release+to+Test+PyPI%22 | |
# and watch for a new run of this workflow to publish to test.pypi.org. | |
# IMPORTANT: Run the following to clean up after: | |
# git tag -d 0.21.3.rc1 | |
# git push origin :0.21.3.rc1 | |
- "[0-9]+.[0-9]+.[0-9]+.rc[0-9]+" | |
workflow_dispatch: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out source | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d | |
with: | |
python-version: '3.12' | |
- run: python -m pip install -U build | |
- run: python -m build | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
verbose: true | |
permissions: | |
contents: read |