-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pypi publish to do correct dev vs. release types.
- Loading branch information
1 parent
be7942b
commit f2d4021
Showing
1 changed file
with
10 additions
and
2 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 |
---|---|---|
|
@@ -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: | ||
|