Skip to content

fix: πŸš‘ really fix ci #17

fix: πŸš‘ really fix ci

fix: πŸš‘ really fix ci #17

Workflow file for this run

# Copyright (c) 2022 Joshua Schmitt
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
name: "🍺 Release Build"
on:
push:
tags:
- 'v*'
jobs:
getinfo:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
name: "πŸ“™ Modpack Info"
steps:
- name: "πŸ” Checkout"
uses: actions/checkout@v4
- name: "πŸ“› Get tag"
id: version
uses: "WyriHaximus/github-action-get-previous-tag@v1"
changelog:
runs-on: ubuntu-latest
name: "πŸ“œ Changelog"
outputs:
changelog: ${{steps.changelog.outputs.changelog}}
steps:
- name: "πŸ” Checkout"
uses: actions/checkout@v4
- name: "πŸ—’οΈ Build Changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.PROFILE_TOKEN }}
build_20:
name: 🐸 Build 1.20
runs-on: ubuntu-latest
steps:
- name: πŸ” Checkout
uses: actions/checkout@v4
- 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@v3
with:
name: JqshuvPack-1.20.X
path: |
assets/
pack.mcmeta
pack.png
credits.md
build_old:
name: 🐐 Build Old
runs-on: ubuntu-latest
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:
files: assets/ pack.mcmeta pack.png credits.md
dest: pack.zip
- name: 🏹 Upload
uses: actions/upload-artifact@v3
with:
name: JqshuvPack-${{ matrix.version }}.X
path: |
assets/
pack.mcmeta
pack.png
credits.md
zip_build:
name: "πŸ“­ Build ZIP Release"
needs: [build_old, build_20]
runs-on: ubuntu-latest
strategy:
matrix:
version: [1.16, 1.17, 1.18, 1.19, 1.20]
steps:
- name: "πŸ”½ Download Packs"
uses: actions/download-artifact@v3
with:
name: JqshuvPack-${{ matrix.version }}.X
- name: πŸ“¦ ZIP
run: zip -r JqshuvPack-${{ matrix.version }}.X.zip *
- name: 🏹 Upload
uses: actions/upload-artifact@v3
with:
name: packs
path: JqshuvPack-${{ matrix.version }}.X.zip
release-github:
runs-on: ubuntu-latest
needs: [build_old, build_20, zip_build, changelog, getinfo]
name: "πŸ™ Release to Github"
steps:
- name: "πŸ”½ Download Packs"
uses: actions/download-artifact@v3
with:
name: packs
- name: "🐍 Get release type"
id: release-type
run: |
rel_type="release"
case "${{ needs.getinfo.outputs.tag }}" in
*alpha*) rel_type="true" ;;
*beta*) rel_type="true" ;;
*rc**) rel_type="true" ;;
*) rel_type="false" ;;
esac
echo "::set-output name=type::$rel_type"
- name: "🧬 Create release"
uses: softprops/action-gh-release@v1
with:
body_path: ${{ steps.changelog.outputs.changelog }}
prerelease: ${{ steps.release-type.outputs.type }}
files: |
JqshuvPack-1.16.X.zip
JqshuvPack-1.17.X.zip
JqshuvPack-1.18.X.zip
JqshuvPack-1.19.X.zip
JqshuvPack-1.20.X.zip
token: ${{ secrets.PROFILE_TOKEN }}