From e4fb8bca95e4b38e52d641c8ee64f3b30e2bd50e Mon Sep 17 00:00:00 2001 From: xHR Date: Tue, 10 Sep 2024 14:11:09 +0300 Subject: [PATCH] Realese only of had new commits on original repo --- .github/workflows/release.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a12711ea..1f054023 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,9 +24,22 @@ jobs: git fetch upstream git checkout master git merge upstream/master --allow-unrelated-histories - git push origin master + + - name: Check for changes + id: check_changes + run: | + if [ -n "$(git log HEAD..upstream/master --oneline)" ]; then + echo "changes=true" >> $GITHUB_OUTPUT + else + echo "changes=false" >> $GITHUB_OUTPUT + fi + + - name: Push changes if any + if: steps.check_changes.outputs.changes == 'true' + run: git push origin master - name: Copy required files + if: steps.check_changes.outputs.changes == 'true' run: | mkdir -p apps/Nintendont/ cp loader/loader.dol apps/Nintendont/ @@ -34,9 +47,11 @@ jobs: cp nintendont/icon.png apps/Nintendont/ - name: Archive folder into nintendont.zip + if: steps.check_changes.outputs.changes == 'true' run: zip -r nintendont.zip apps/ - name: Create Release + if: steps.check_changes.outputs.changes == 'true' uses: softprops/action-gh-release@v1 with: files: nintendont.zip