From 0481c00adb5ba0bc822438b9b7586a05127cff0a Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 30 Dec 2024 02:28:25 +0100 Subject: [PATCH] fix: Optimize devbuild.yml by removing unnecessary git directory cleanup and refining artifact upload steps --- .github/workflows/devbuild.yml | 85 +++++++++++----------------------- 1 file changed, 27 insertions(+), 58 deletions(-) diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 5910d24..512392b 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -36,38 +36,22 @@ jobs: uses: actions/checkout@v4 with: ref: 'ver/${{ matrix.version }}' - fetch-depth: 0 - - - name: ๐Ÿ’พ Update Pack - run: | - rm -rf .git - echo "`jq '.pack.pack_format=${{ matrix.pack_version }}' pack.mcmeta`" > pack.mcmeta - - - name: Run PackSquash - uses: ComunidadAylas/PackSquash-action@v4 + - 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: - packsquash_version: latest - artifact_name: PackTemporary-${{ matrix.version }}.X - options: | - pack_directory = '.' - output_file_path = '/tmp/pack.zip' - ignore_system_and_hidden_files = false - never_store_squash_times = true - - # - 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 - # with: - # name: JqshuvPack-${{ matrix.version }}.X - # path: | - # assets/ - # pack.mcmeta - # pack.png - # credits.md + files: assets/ pack.mcmeta pack.png credits.md + dest: pack.zip + - name: ๐Ÿน Upload + uses: actions/upload-artifact@v4 + with: + name: JqshuvPack-${{ matrix.version }}.X + path: | + assets/ + pack.mcmeta + pack.png + credits.md # zip_build: # name: "๐Ÿ“ญ Build ZIP Release" @@ -77,33 +61,18 @@ jobs: # matrix: # version: [1.16, 1.17, 1.18, 1.19, "1.20"] # steps: - # - name: ๐Ÿ”ฝ Download Packs + # - name: "๐Ÿ”ฝ Download Packs" # uses: actions/download-artifact@v4 # with: - # name: PackTemporary-${{ matrix.version }}.X - # path: temp-${{ matrix.version }} - - # - name: ๐ŸŒด Unzip - # run: | - # unzip temp-${{ matrix.version }}/pack.zip -d temp-${{ matrix.version }} - # rm temp-${{ matrix.version }}/pack.zip - - # - name: List Files - # run: ls -R temp-${{ matrix.version }} - - # - name: ๐Ÿ“ฆ ZIP - # uses: vimtor/action-zip@v1 - # with: - # files: temp-${{ matrix.version }}/* - # dest: JqshuvPack-${{ matrix.version }}.X.zip - - # - name: ๐Ÿงน Cleanup - # uses: geekyeggo/delete-artifact@v5 - # with: - # name: PackTemporary-${{ matrix.version }}.X - - # - name: ๐Ÿน Upload - # uses: actions/upload-artifact@v4 - # with: # name: JqshuvPack-${{ matrix.version }}.X - # path: JqshuvPack-${{ matrix.version }}.X.zip + # 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