Skip to content

Commit

Permalink
ci: Publish releases to PyPI through GitHub releases (#41)
Browse files Browse the repository at this point in the history
* Publish to PyPI through published release events triggered through GitHub releases
   - c.f. https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release
* Add workflow dispatch to all GitHub Action workflows
  • Loading branch information
matthewfeickert authored Oct 12, 2020
1 parent bec1f28 commit 51074be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Lint

on:
pull_request:
workflow_dispatch:

jobs:
lint:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches:
- master
release:
types: [published]
workflow_dispatch:

jobs:
build-and-publish:
Expand Down Expand Up @@ -69,3 +72,8 @@ jobs:
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'dguest/pandamonium'
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}

0 comments on commit 51074be

Please sign in to comment.