Skip to content

Commit

Permalink
Simplify deployment
Browse files Browse the repository at this point in the history
Manual dispatch to test and then deploy just takes far too long -
waiting for the merge-to-master run, the tag run, then two manual runs.
If we could have a manually triggered deployment-only workflow that can
fetch the dist artifacts from the tag build, that would be ideal.
  • Loading branch information
ixjlyons committed Jul 1, 2022
1 parent d2f6e50 commit 7407a6b
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ on:
tags:
- 'v*'
workflow_dispatch:
inputs:
pypi_server:
description: 'PyPI Server'
required: true
default: 'Test PyPI'
type: choice
options:
- 'Test PyPI'
- 'PyPI'

jobs:
build_wheels:
Expand Down Expand Up @@ -66,24 +57,18 @@ jobs:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }} && ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Publish wheels to Test PyPI
- name: Publish dist to PyPI
uses: pypa/[email protected]
if: ${{ github.events.inputs.pypi_server == 'Test PyPI' }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish wheels to PyPI
uses: pypa/[email protected]
if: ${{ github.events.inputs.pypi_server == 'PyPI' }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/

0 comments on commit 7407a6b

Please sign in to comment.