Skip to content

Commit

Permalink
Fix github action to work on new tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
markBowman committed Feb 15, 2022
1 parent 2929502 commit d6e3299
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
name: Publish to PyPI and test PyPI

on: push
on: release

jobs:
publish_to_test_pypi:
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package and publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository testpypi dist/*
publish_to_pypi:
# Only run this job if this workflow was triggered by the creation of a new tag
if: github.event_name == 'create' && github.event.ref_type == 'tag' && github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down

0 comments on commit d6e3299

Please sign in to comment.