diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index f6bcb3eaf..cdd300d0f 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -15,12 +15,23 @@ jobs: with: fetch-depth: 2 - - name: Check if Nightly Release Building changed + - name: Get file changes + id: changed-files + run: | + DIFF=$(git diff HEAD^ HEAD -- "datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json") + echo "diff<> $GITHUB_OUTPUT + echo "$DIFF" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Check if Nightly Building changed id: check - shell: bash run: | - if git diff HEAD^ HEAD -- "datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json" | grep -q '"Nightly Building"'; then - echo "changed=true" >> $GITHUB_OUTPUT + if echo "${{ steps.changed-files.outputs.diff }}" | grep -q '"Nightly Building"'; then + if ! echo "${{ steps.changed-files.outputs.diff }}" | grep -q '"Release Building"'; then + echo "changed=true" >> $GITHUB_OUTPUT + else + echo "changed=false" >> $GITHUB_OUTPUT + fi else echo "changed=false" >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a984b55a5..e7d3f0283 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,23 @@ jobs: with: fetch-depth: 2 + - name: Get file changes + id: changed-files + run: | + DIFF=$(git diff HEAD^ HEAD -- "datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json") + echo "diff<> $GITHUB_OUTPUT + echo "$DIFF" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + - name: Check if Release Building changed id: check - shell: bash run: | - if git diff HEAD^ HEAD -- "datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json" | grep -q '"Release Building"'; then - echo "changed=true" >> $GITHUB_OUTPUT + if echo "${{ steps.changed-files.outputs.diff }}" | grep -q '"Release Building"'; then + if ! echo "${{ steps.changed-files.outputs.diff }}" | grep -q '"Nightly Building"'; then + echo "changed=true" >> $GITHUB_OUTPUT + else + echo "changed=false" >> $GITHUB_OUTPUT + fi else echo "changed=false" >> $GITHUB_OUTPUT fi diff --git a/datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json b/datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json index 7d7871492..dd8f56100 100644 --- a/datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json +++ b/datapacks/Skyblock CE datapacks/data/skyblock/function/versions/changelog/building_version.json @@ -7,7 +7,7 @@ "Release Building": "JE-1.21/1.21.1-6.0.0-Skyblock_Classic_Edition:9testCI", -"Nightly Building": "JE-1.21/1.21.1-6.0.0-Skyblock_Classic_Edition:NIGHTLY_BUILDING_20.01.2025.11738a_[CItest]", +"Nightly Building": "JE-1.21/1.21.1-6.0.0-Skyblock_Classic_Edition:NIGHTLY_BUILDING_20.01.2025.21738a_[CItest]", "Data_pack": "TRUE",