Skip to content

Commit

Permalink
try fixing manual triggering condition for testpypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus-von-Koeller committed Mar 6, 2024
1 parent a73d0a1 commit 07c04a2
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- 'pytest.ini'
release:
types: [ published ]
workflow_dispatch: {} # Allow manual trigger

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -206,27 +207,26 @@ jobs:
publish:
needs: build-wheels
runs-on: ubuntu-latest
if: >
github.event_name == 'workflow_dispatch' && (
github.actor == 'TimDettmers' ||
github.actor == 'Titus-von-Koeller' ||
github.actor == 'younesbelkada' ||
github.actor == 'matthewdouglas'
)
steps:
- uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
pattern: "bdist_wheel_*"
- run: |
ls -lR dist/
- name: Publish to TestPyPI
if: >-
github.event_name == 'workflow_dispatch' &&
contains(fromJson('[
"TimDettmers",
"Titus-von-Koeller",
"younesbelkada",
"matthewdouglas"
]'), github.actor)
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
pattern: "bdist_wheel_*"
- run: |
ls -lR dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

0 comments on commit 07c04a2

Please sign in to comment.