Skip to content

Commit

Permalink
feat: Enhance devbuild.yml with build_old job and artifact naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jqshuv committed Dec 30, 2024
1 parent f8996df commit 19cc7f5
Showing 1 changed file with 65 additions and 50 deletions.
115 changes: 65 additions & 50 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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

0 comments on commit 19cc7f5

Please sign in to comment.