Skip to content

Commit 9c5534c

Browse files
committed
Don't release if the changelog contains no changes
1 parent 5d8803b commit 9c5534c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,29 @@ jobs:
5656
owner: "tuist"
5757
repo: "XcodeGraph"
5858
configuration: ".github/changelog-configuration.json"
59+
- name: Check if there are categorized PRs
60+
id: check_prs
61+
run: |
62+
if [ "${{ steps.changelog.outputs.categorized_prs }}" = "0" ]; then
63+
echo "skip_next_steps=true" >> $GITHUB_OUTPUT
64+
else
65+
echo "skip_next_steps=false" >> $GITHUB_OUTPUT
66+
fi
5967
- name: Update Changelog
6068
uses: stefanzweifel/changelog-updater-action@v1
69+
if: steps.check_prs.outputs.skip_next_steps != 'true'
6170
with:
6271
latest-version: ${{ steps.set_version.outputs.version }}
6372
release-notes: ${{ steps.changelog.outputs.changelog }}
6473
path-to-changelog: CHANGELOG.md
6574
- uses: stefanzweifel/git-auto-commit-action@v5
75+
if: steps.check_prs.outputs.skip_next_steps != 'true'
6676
with:
6777
commit_message: "Version ${{ steps.set_version.outputs.version }}"
6878
tagging_message: ${{ steps.set_version.outputs.version }}
6979
commit_options: '--allow-empty'
7080
- name: Create GitHub Release on the tuist/XcodeGraph repository
81+
if: steps.check_prs.outputs.skip_next_steps != 'true'
7182
uses: softprops/action-gh-release@v1
7283
with:
7384
draft: false

0 commit comments

Comments
 (0)