generated from ParadigmMC/mc-modpack-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 15e21c3
Showing
19 changed files
with
932 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Disable Git line ending conversion, to prevent packwiz index hashes changing when committing from Windows | ||
* -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request for CI | ||
about: Suggest an idea for this project to use in the CI actions | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request for docs | ||
about: Suggest an idea for this project to use in it's README | ||
title: '' | ||
labels: documentation | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Question | ||
about: Ask a question about this project | ||
title: '' | ||
labels: question | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the question** | ||
A clear and concise description of the question. | ||
|
||
**Is your question related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. E.g., I'm always frustrated when [...] | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
|
||
- [ ] Clarification needed | ||
- [ ] Technical issue | ||
- [ ] Conventional commits | ||
- [ ] Problems with GitHub Actions | ||
- [ ] Versioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
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: | ||
- name: Check Out Git Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: 'main' | ||
|
||
- 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" | ||
|
||
- 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 }} | ||
|
||
- 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 }} | ||
|
||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Bump Modpack Action | Action' | ||
description: 'Bump a modpacks version' | ||
|
||
inputs: | ||
release-tag: | ||
description: 'The release tag to bump the modpack to' | ||
required: true | ||
modpack: | ||
description: 'Path to the modpack directory' | ||
required: false | ||
default: '.' | ||
pack-file: | ||
description: 'Path to the pack config file' | ||
required: false | ||
default: 'pack.toml' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Check Out Git Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set the version | ||
run: sed -i 's/version = "[^"]*"/version = "${{ inputs.release-tag }}"/' ${{ inputs.modpack }}/${{ inputs.pack-file }} | ||
shell: bash | ||
|
||
- name: Push the Updated Version | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
push_options: --force | ||
commit_message: "chore(${{ inputs.modpack }}): bump version to ${{ inputs.release-tag }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: 'Parse Modpack | Action' | ||
description: 'Parses a modpacks pack file' | ||
|
||
inputs: | ||
modpack: | ||
description: 'Path to the modpack directory' | ||
required: false | ||
default: '.' | ||
pack-file: | ||
description: 'Path to the pack config file' | ||
required: false | ||
default: 'pack.toml' | ||
|
||
outputs: | ||
loader: | ||
description: 'Detected mod loader' | ||
value: ${{ steps.parse.outputs.loader }} | ||
game-version: | ||
description: 'Detected game version' | ||
value: ${{ steps.parse.outputs.game-version }} | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Check Out Git Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Parse the pack.toml | ||
id: parse | ||
run: | | ||
loaders=("fabric" "forge" "quilt" "neoforge") | ||
for loader in "${loaders[@]}"; do | ||
if [[ $(<"${{ env.pack-file }}") == *"$loader ="* ]]; then | ||
LOADER="$loader" && break | ||
fi | ||
done | ||
[[ -z "$LOADER" ]] && { echo "::error file=${{ env.pack-file }}::No match found for loaders in ${{ env.pack-file }}" && exit 1; } | ||
GAME_VERSION=$(grep -oP 'minecraft = "\K[^"]+' "${{ env.pack-file }}") | ||
echo "loader=$LOADER" >> $GITHUB_ENV | ||
echo "game-version=$GAME_VERSION" >> $GITHUB_ENV | ||
echo "::notice ::⚙ The detected loader for ${{ inputs.modpack }} is $LOADER" | ||
echo "::notice ::⚙ The detected game version for ${{ inputs.modpack }} is $GAME_VERSION" | ||
shell: bash | ||
working-directory: ${{ inputs.modpack }} |
Oops, something went wrong.