Skip to content

Commit

Permalink
Fix pypi publish to do correct dev vs. release types.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Oct 11, 2021
1 parent be7942b commit f2d4021
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,32 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
# Install..
- uses: actions/checkout@v2
- uses: "actions/[email protected]"
with: { python-version: "3.x" }
- name: Upgrade Pip
run: python -m pip install --upgrade pip
- name: Install pypa/build
run: python -m pip install build --user
- name: Build PyPI Package
# Build and publish test/dev package.
- name: Build Test PyPI Package
if: ${{ github.event_name != 'release' }}
run: python -m build --sdist --wheel --outdir dist/
env:
GHA_TEST_VERSION: yes
- name: Publish to Test PyPI
if: ${{ github.event_name != 'release' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
- name: Publish to Distribution PyPI
# Build and publish release package.
- name: Build Release PyPI Package
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to Release PyPI
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit f2d4021

Please sign in to comment.