mirror of
https://github.com/darksaid98/optim.git
synced 2026-12-01 22:16:40 +00:00
refactor: add mc-modpack-kit template
This commit is contained in:
108 files changed
+773
No files matched your search
@@ -0,0 +1,84 @@
|
||||
name: 'Build Modpack Action | Action'
|
||||
description: 'Uses packwiz to build the modpack!'
|
||||
inputs:
|
||||
release-tag:
|
||||
description: "The release tag for the modpack upload"
|
||||
required: true
|
||||
build-modrinth:
|
||||
description: "Set to 'true' to build the Modrinth .mrpack file"
|
||||
required: true
|
||||
build-curse:
|
||||
description: "Set to 'true' to build the CurseForge .zip file"
|
||||
required: true
|
||||
modpack:
|
||||
description: "Path to the modpack directory"
|
||||
required: false
|
||||
default: '.'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
|
||||
# --- Checkout the repo
|
||||
- name: Check Out Git Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: 'main'
|
||||
|
||||
|
||||
# --- Install Packwiz
|
||||
- name: Install packwiz
|
||||
uses: supplypike/setup-bin@v3
|
||||
with:
|
||||
uri: "https://nightly.link/packwiz/packwiz/workflows/go/main/Linux%2064-bit%20x86.zip"
|
||||
name: "packwiz"
|
||||
version: "linux"
|
||||
|
||||
|
||||
# --- Build Modrinth Pack If Wanted
|
||||
- name: Build Modrinth Modpack
|
||||
if: inputs.build-modrinth == 'true'
|
||||
run: |
|
||||
packwiz modrinth export
|
||||
echo "::notice ::⚙ Modpack ${{ inputs.modpack }} has been exported as .mrpack"
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.modpack }}
|
||||
|
||||
|
||||
# --- Build Curseforge Pack If Wanted
|
||||
- name: Build CurseForge Modpack
|
||||
if: inputs.build-curse == 'true'
|
||||
run: |
|
||||
packwiz curseforge export
|
||||
echo "::notice ::⚙ Modpack ${{ inputs.modpack }} has been exported as .zip"
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.modpack }}
|
||||
|
||||
|
||||
# --- Upload the pack/s to releases
|
||||
|
||||
- name: Upload Modrinth Modpack to GitHub Releases
|
||||
if: inputs.build-modrinth == 'true'
|
||||
run: |
|
||||
gh release upload ${{ inputs.release-tag }} *.mrpack \
|
||||
--repo ${{ github.repository_owner }}/${{ github.event.repository.name }} \
|
||||
--clobber
|
||||
echo "::notice ::☀ Modpack ${{ inputs.modpack }} has been uploaded to GitHub Releases as a .mrpack"
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
working-directory: ${{ inputs.modpack }}
|
||||
|
||||
- name: Upload CurseForge Modpack to GitHub Releases
|
||||
if: inputs.build-curse == 'true'
|
||||
run: |
|
||||
gh release upload ${{ inputs.release-tag }} *.zip \
|
||||
--repo ${{ github.repository_owner }}/${{ github.event.repository.name }} \
|
||||
--clobber
|
||||
echo "::notice ::☀ Modpack ${{ inputs.modpack }} has been uploaded to GitHub Releases as a .zip"
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
working-directory: ${{ inputs.modpack }}
|
||||
Reference in new issue
Block a user