Skip to content

Commit

Permalink
fix: Optimize devbuild.yml by removing unnecessary git directory clea…
Browse files Browse the repository at this point in the history
…nup and refining artifact upload steps
  • Loading branch information
jqshuv committed Dec 30, 2024
1 parent 6df4526 commit 0481c00
Showing 1 changed file with 27 additions and 58 deletions.
85 changes: 27 additions & 58 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

0 comments on commit 0481c00

Please sign in to comment.