-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initialize testpypi workflow * only publish specifically tagged versions * downgrade to python3.8 * skip trying to publish existing versions * update instructions to account for GH Actions
- Loading branch information
1 parent
372f9bf
commit d8f07ee
Showing
2 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish tagged commits to TestPyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip build wheel twine | ||
- name: Build dists | ||
run: | | ||
python -m build . | ||
- name: Test build and wheel | ||
run: | | ||
cd dist && pip install $(ls *.whl) && twine check * | ||
- name: Publish distribution to TestPyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: True |
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