From 821d1626baf1e50a3f8fee76212218419d70ddff Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 30 Dec 2024 02:41:47 +0100 Subject: [PATCH] fix: Add latest version handling in release.yml for conditional checkout steps --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index feca718..e3cb4c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,21 +46,37 @@ jobs: include: - version: 1.16 pack_version: 6 + latest: false - version: 1.17 pack_version: 7 + latest: false - version: 1.18 pack_version: 8 + latest: false - version: 1.19 pack_version: 13 + latest: false - version: 1.20 pack_version: 32 + latest: false - version: 1.21 pack_version: 46 + latest: true steps: - name: 🔁 Checkout + if: ${{ matrix.latest == false }} uses: actions/checkout@v4 with: ref: 'ver/${{ matrix.version }}' + + + - name: 🔁 Checkout + if: ${{ matrix.latest == true }} + uses: actions/checkout@v4 + with: + ref: 'ver/${{ matrix.version }}' + + - name: 💾 Update config.json run: echo "`jq '.pack.pack_format=${{ matrix.pack_version }}' pack.mcmeta`" > pack.mcmeta - name: 📦 ZIP