From 19cc7f55890f17fb6a844c5d84e1c3a2d1a644e7 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 30 Dec 2024 02:00:29 +0100 Subject: [PATCH] feat: Enhance devbuild.yml with build_old job and artifact naming --- .github/workflows/devbuild.yml | 115 +++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 50 deletions(-) diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 5f16cb6..ffa05eb 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -22,6 +22,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: 💾 Update config.json run: echo "`jq '.pack.pack_format=18' pack.mcmeta`" > pack.mcmeta @@ -32,41 +33,55 @@ jobs: options: | pack_directory = '.' output_file_path = '/tmp/pack.zip' + artifact_name = 'JqshuvPack-1.20.X' # - name: 📦 ZIP # uses: vimtor/action-zip@v1 # with: # files: assets/ pack.mcmeta pack.png credits.md # dest: pack.zip - - name: 🏹 Upload - uses: actions/upload-artifact@v4 + # - name: 🏹 Upload + # uses: actions/upload-artifact@v4 + # with: + # name: JqshuvPack-1.20.X + # path: | + # /tmp/pack.zip + + build_old: + name: 🐐 Build Old + runs-on: ubuntu-24.04 + strategy: + matrix: + version: [1.16, 1.17, 1.18, 1.19] + include: + - version: 1.16 + pack_version: 6 + - version: 1.17 + pack_version: 7 + - version: 1.18 + pack_version: 8 + - version: 1.19 + pack_version: 13 + steps: + - name: 🔁 Checkout + uses: actions/checkout@v4 with: - name: JqshuvPack-1.20.X - path: | - /tmp/pack.zip + ref: 'ver/${{ matrix.version }}' + fetch-depth: 0 + + - name: 💾 Update config.json + run: echo "`jq '.pack.pack_format=${{ matrix.pack_version }}' pack.mcmeta`" > pack.mcmeta + + + - name: Run PackSquash + uses: ComunidadAylas/PackSquash-action@v4 + with: + packsquash_version: latest + options: | + pack_directory = '.' + output_file_path = '/tmp/pack.zip' + artifact_name = 'JqshuvPack-${{ matrix.pack_version }}.X' - # build_old: - # name: 🐐 Build Old - # runs-on: ubuntu-24.04 - # strategy: - # matrix: - # version: [1.16, 1.17, 1.18, 1.19] - # include: - # - version: 1.16 - # pack_version: 6 - # - version: 1.17 - # pack_version: 7 - # - version: 1.18 - # pack_version: 8 - # - version: 1.19 - # pack_version: 13 - # steps: - # - name: 🔁 Checkout - # 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 # uses: vimtor/action-zip@v1 # with: @@ -82,26 +97,26 @@ jobs: # pack.png # credits.md - # zip_build: - # name: "📭 Build ZIP Release" - # needs: [build_old, build_20] - # runs-on: ubuntu-24.04 - # strategy: - # matrix: - # version: [1.16, 1.17, 1.18, 1.19] - # steps: - # - name: "🔽 Download Packs" - # uses: actions/download-artifact@v4 - # with: - # name: JqshuvPack-${{ matrix.version }}.X - # path: temp-${{ matrix.version }} - # - name: 📦 ZIP - # uses: vimtor/action-zip@v1 - # with: - # files: temp-${{ matrix.version }}/* - # dest: JqshuvPack-${{ matrix.version }}.X.zip - # #- name: 🏹 Upload - # # uses: actions/upload-artifact@v4 - # # with: - # # name: packs - # # path: JqshuvPack-${{ matrix.version }}.X.zip + zip_build: + name: "📭 Build ZIP Release" + needs: [build_old, build_20] + runs-on: ubuntu-24.04 + strategy: + matrix: + version: [1.16, 1.17, 1.18, 1.19, 1.20] + steps: + - name: "🔽 Download Packs" + uses: actions/download-artifact@v4 + with: + name: JqshuvPack-${{ matrix.version }}.X + path: temp-${{ matrix.version }} + - name: 📦 ZIP + uses: vimtor/action-zip@v1 + with: + files: temp-${{ matrix.version }}/* + dest: JqshuvPack-${{ matrix.version }}.X.zip + #- name: 🏹 Upload + # uses: actions/upload-artifact@v4 + # with: + # name: packs + # path: JqshuvPack-${{ matrix.version }}.X.zip