Skip to content

Commit 7518a6c

Browse files
authored
MAINT: Avoiding useless execution of create-github-release & publish-to-pypi workflows for every commit on the main branch (#94)
1 parent 206760b commit 7518a6c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/create-github-release.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ permissions:
1515

1616
jobs:
1717
build_and_publish:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1819
name: Create a GitHub release page
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Checkout Repository
2223
uses: actions/checkout@v4
24+
2325
- name: Prepare variables
2426
id: prepare_variables
2527
run: |
@@ -31,6 +33,7 @@ jobs:
3133
echo "tag_body<<$EOF" >> "$GITHUB_ENV"
3234
git --no-pager tag -l "${latest_tag}" --format='%(contents:body)' >> "$GITHUB_ENV"
3335
echo "$EOF" >> "$GITHUB_ENV"
36+
3437
- name: Create GitHub Release 🚀
3538
uses: softprops/action-gh-release@v2
3639
with:

.github/workflows/publish-to-pypi.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions:
1515

1616
jobs:
1717
build_and_publish:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1819
name: Publish a new version
1920
runs-on: ubuntu-latest
2021
steps:

0 commit comments

Comments
 (0)