Skip to content

Commit

Permalink
add workflow_dispatch trigger to test.yml action
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jun 23, 2023
1 parent 959ffcb commit a9cc687
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ on:
branches: [main]
release:
types: [published]
workflow_dispatch:
inputs:
task:
type: choice
options: [tests, release]
default: tests
description: Only run tests or release a new version of pymatgen to PyPI after tests pass.

jobs:
tests:
Expand Down Expand Up @@ -48,7 +55,7 @@ jobs:
release:
runs-on: ubuntu-latest
needs: tests
if: github.event_name == 'release' && needs.tests.result == 'success'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.task == 'release')
permissions:
# For PyPI trusted publishing
id-token: write
Expand Down

0 comments on commit a9cc687

Please sign in to comment.