2021-01-13 15:54:58 +00:00
|
|
|
name: Release to Test PyPI
|
2022-11-02 23:35:41 +00:00
|
|
|
|
2021-12-24 19:06:47 +00:00
|
|
|
"on":
|
2022-12-24 15:03:06 +00:00
|
|
|
workflow_dispatch:
|
2021-01-13 15:54:58 +00:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
# To publish a test release to test.pypi.org,
|
|
|
|
# create and push a tag as follows:
|
2021-09-05 15:25:22 +00:00
|
|
|
# git tag -a 0.21.3.rc1 -m "Tag 0.21.3.rc1 for release to test.pypi.org"
|
2021-01-13 15:54:58 +00:00
|
|
|
# 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:
|
2021-09-05 15:25:22 +00:00
|
|
|
# git tag -d 0.21.3.rc1
|
|
|
|
# git push origin :0.21.3.rc1
|
|
|
|
- "[0-9]+.[0-9]+.[0-9]+.rc[0-9]+"
|
2022-11-02 23:35:41 +00:00
|
|
|
|
2021-01-13 15:54:58 +00:00
|
|
|
jobs:
|
2022-11-02 23:35:41 +00:00
|
|
|
main:
|
2021-01-13 15:54:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-29 23:34:13 +00:00
|
|
|
- uses: actions/checkout@v3.1.0
|
|
|
|
- uses: actions/setup-python@v4.3.0
|
|
|
|
with:
|
|
|
|
python-version: '3.11'
|
2022-10-23 12:38:52 +00:00
|
|
|
- run: python -m pip install -U pip setuptools build
|
2022-01-06 02:14:02 +00:00
|
|
|
- run: python -m build
|
2021-12-24 19:06:47 +00:00
|
|
|
- name: Publish
|
2022-11-05 02:04:08 +00:00
|
|
|
uses: pypa/gh-action-pypi-publish@v1.6.1
|
2021-12-24 19:06:47 +00:00
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
verbose: true
|