From a01e0a2fa3440c4652aed2fe270e6824e8ebda56 Mon Sep 17 00:00:00 2001 From: AirryCo Date: Sun, 12 Jan 2025 11:37:53 +0800 Subject: [PATCH] bug fixed. --- .github/workflows/build-nightly-cron.yaml | 13 +++++++------ .github/workflows/build-release-cron.yaml | 9 ++++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-nightly-cron.yaml b/.github/workflows/build-nightly-cron.yaml index b910305..65e5552 100644 --- a/.github/workflows/build-nightly-cron.yaml +++ b/.github/workflows/build-nightly-cron.yaml @@ -142,7 +142,7 @@ jobs: npm run build mkdir output cd output - unzip ../dist/fika-server.zip + unzip ../dist/*.zip shell: bash - name: Generate Artifact File Name @@ -475,8 +475,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Update trigger and Push to GitHub run: | git config user.name "github-actions[bot]" @@ -487,9 +485,12 @@ jobs: echo "server=$server" > trigger.nightly fika=${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }} echo "fika=$fika" >> trigger.nightly - git add trigger.nightly - git commit -m "🤖 up to spt-server: \`$server\`, fika-server:\`${fika:0:8}\`." - git push + changes=$(git status --porcelain) + if [ -n "$changes" ]; then + git add trigger.nightly + git commit -m "🤖 auto built spt-server: \`$server\`, fika-server:\`${fika:0:8}\`." + git push + fi shell: bash assemble-and-publish: diff --git a/.github/workflows/build-release-cron.yaml b/.github/workflows/build-release-cron.yaml index c1a9cfe..cc9dcc0 100644 --- a/.github/workflows/build-release-cron.yaml +++ b/.github/workflows/build-release-cron.yaml @@ -487,9 +487,12 @@ jobs: rm trigger.release echo "server=${{ needs.prepare.outputs.TARGET_TAG }}" > trigger.release echo "fika=${{ needs.prepare.outputs.TARGET_TAG_FIKA }}" >> trigger.release - git add trigger.release - git commit -m "🤖 bump to \`${{ needs.prepare.outputs.TARGET_TAG }}\`." - git push + changes=$(git status --porcelain) + if [ -n "$changes" ]; then + git add trigger.release + git commit -m "🤖 bump to \`${{ needs.prepare.outputs.TARGET_TAG }}\`." + git push + fi shell: bash - name: Download Windows Artifact