Skip to content

Commit

Permalink
build: use the correct item: github.event.action
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jun 22, 2024
1 parent ccbab15 commit c20af95
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
name: "Publish"

on:
workflow_dispatch:
repository_dispatch:
types:
- publish-testpypi
Expand All @@ -22,37 +21,9 @@ concurrency:
cancel-in-progress: true

jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"

publish-to-test-pypi:
name: "Publish to Test PyPI"
if: ${{ github.event.client_payload.event_type == 'publish-testpypi' }}
if: ${{ github.event.action == 'publish-testpypi' }}
permissions:
id-token: write # Needed for trusted publishing to PyPI.
runs-on: "ubuntu-latest"
Expand All @@ -76,7 +47,7 @@ jobs:

publish-to-pypi:
name: "Publish to PyPI"
if: ${{ github.event.client_payload.event_type == 'publish-pypi' }}
if: ${{ github.event.action == 'publish-pypi' }}
permissions:
id-token: write # Needed for trusted publishing to PyPI.
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit c20af95

Please sign in to comment.