Skip to content

Commit bd30863

Browse files
Add action conditions of publish
1 parent ee24e81 commit bd30863

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/publish_all.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
store-build:
4949
name: build release
5050
needs: super-test
51-
if: always() && !cancelled() && !failure()
51+
if: ${{ !cancelled() &&
52+
!failure() &&
53+
github.event_name == 'push' &&
54+
github.run_attempt == 1 }}
5255
runs-on: ubuntu-latest
5356
steps:
5457
- name: Checkout
@@ -73,7 +76,10 @@ jobs:
7376
needs:
7477
- super-test
7578
- store-build
76-
if: always() && !cancelled() && !failure()
79+
if: ${{ !cancelled() &&
80+
!failure() &&
81+
github.event_name == 'push' &&
82+
github.run_attempt == 1 }}
7783
runs-on: ubuntu-latest
7884

7985
permissions:
@@ -117,7 +123,10 @@ jobs:
117123
- super-test
118124
- store-build
119125
- github-release
120-
if: always() && !cancelled() && !failure()
126+
if: ${{ !cancelled() &&
127+
!failure() &&
128+
github.event_name == 'push' &&
129+
github.run_attempt == 1 }}
121130
runs-on: ubuntu-latest
122131
environment:
123132
name: pypi

0 commit comments

Comments
 (0)