Skip to content

Commit c20af95

Browse files
committed
build: use the correct item: github.event.action
1 parent ccbab15 commit c20af95

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

.github/workflows/publish.yml

+2-31
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
name: "Publish"
55

66
on:
7-
workflow_dispatch:
87
repository_dispatch:
98
types:
109
- publish-testpypi
@@ -22,37 +21,9 @@ concurrency:
2221
cancel-in-progress: true
2322

2423
jobs:
25-
dump_contexts_to_log:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Dump GitHub context
29-
env:
30-
GITHUB_CONTEXT: ${{ toJson(github) }}
31-
run: echo "$GITHUB_CONTEXT"
32-
- name: Dump job context
33-
env:
34-
JOB_CONTEXT: ${{ toJson(job) }}
35-
run: echo "$JOB_CONTEXT"
36-
- name: Dump steps context
37-
env:
38-
STEPS_CONTEXT: ${{ toJson(steps) }}
39-
run: echo "$STEPS_CONTEXT"
40-
- name: Dump runner context
41-
env:
42-
RUNNER_CONTEXT: ${{ toJson(runner) }}
43-
run: echo "$RUNNER_CONTEXT"
44-
- name: Dump strategy context
45-
env:
46-
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
47-
run: echo "$STRATEGY_CONTEXT"
48-
- name: Dump matrix context
49-
env:
50-
MATRIX_CONTEXT: ${{ toJson(matrix) }}
51-
run: echo "$MATRIX_CONTEXT"
52-
5324
publish-to-test-pypi:
5425
name: "Publish to Test PyPI"
55-
if: ${{ github.event.client_payload.event_type == 'publish-testpypi' }}
26+
if: ${{ github.event.action == 'publish-testpypi' }}
5627
permissions:
5728
id-token: write # Needed for trusted publishing to PyPI.
5829
runs-on: "ubuntu-latest"
@@ -76,7 +47,7 @@ jobs:
7647

7748
publish-to-pypi:
7849
name: "Publish to PyPI"
79-
if: ${{ github.event.client_payload.event_type == 'publish-pypi' }}
50+
if: ${{ github.event.action == 'publish-pypi' }}
8051
permissions:
8152
id-token: write # Needed for trusted publishing to PyPI.
8253
runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)