Tsar Bomba

This commit is contained in:
omo50
2026-04-12 19:54:53 -06:00
parent d583e933df
commit bf1fa435e7
40800 changed files with 162978 additions and 365849 deletions

View File

@@ -1,48 +0,0 @@
# Content Monorepo Forgejo Actions
These are all of the workflows used in the Lasting Legacy Content Monorepo.
## Current Functions
- Auto Publish
- Auto Update*
- Auto Refresh*
- Auto Build
- Datapack Validator
- JSON Linter
- Resource Pack Validator
- Resource Pack Compressor**
*for modpacks only
**on publish and build only
## Using Auto Publish (for devs)
Actions currently use a tag-based release system. Once a tag is created with a certain prefix, it will automatically publish the associated project to Modrinth, Curseforge, and Forgejo.
### Current tags
- RC (Re-Console)
- SL (Simply Legacy)
- 2K (2000's Edition)
- LPC (LCE Panorama Collection)
- LSP (Legacy Skin Packs)
- MSP (Modern Skin Packs)
- O4J (Ore4J)
- FL (Faithful Legacy)
- TUT (Tutorial World Add-on)
- LM (Legacy Mechanics)
- LMA (Legacy Mechanics Add-on)
- LN (Legacy Nether)
- LNE (Legacy Nether Extended)
- HTP (Modern How To Play)
- LT (Legacy Titles)
- VL (Vanilla Live)
- TU0 (Old UI for Legacy4J)
### Creating a release
To create a release using auto-publish, simply create a Forgejo release. So it knows what project you're publishing for, refer to the above tag key. To make a version, all tags must be TAG-x.y.z. ie, Re-Console 26.03.4, would be RC-26.03.4. For an example of SemVer, LN-3.0.0 would also work. Any version number that is at least 3 numbers long will function.
## Incremental Builds
Only the pack modified within a commit will be built. So if you modified something in, lets say Simply Legacy, your commit would only build Simply Legacy, and not Re-Console or 2000's Edition.
# License
Workflows are licensed under the GNU AFFERO GENERAL PUBLIC LICENSE, unless explicitly stated otherwise.

View File

@@ -0,0 +1,81 @@
name: "Auto Update & Refresh"
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
jobs:
auto-update:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.FORGEJO_TOKEN }}
fetch-depth: 1
sparse-checkout: |
modpacks
.actions
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Install Tooling
run: |
mkdir -p $HOME/go/bin
if ! command -v packwiz &> /dev/null; then
go install github.com/packwiz/packwiz@latest
fi
if ! command -v pw &> /dev/null; then
go install github.com/Merith-TK/packwiz-wrapper/cmd/pw@main
fi
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Cache Updater Binary
id: cache-updater
uses: actions/cache@v4
with:
path: ./updater-bin
key: updater-v2-${{ runner.os }}-${{ hashFiles('.actions/updater/**') }}
- name: Ensure Rust
if: steps.cache-updater.outputs.cache-hit != 'true'
run: |
if ! command -v rustup &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build Updater
if: steps.cache-updater.outputs.cache-hit != 'true'
run: |
cargo build --release --manifest-path .actions/updater/Cargo.toml
mkdir -p ./updater-bin
cp .actions/updater/target/release/updater ./updater-bin/updater
- name: Run Updater
id: rust-update
continue-on-error: true
run: |
chmod +x ./updater-bin/updater
./updater-bin/updater
- name: Run Shell Update (Fallback)
if: steps.rust-update.outcome == 'failure'
run: |
echo "Rust Updater failed. Falling back to Shell..."
chmod +x ./modpacks/update-refresh.sh
./modpacks/update-refresh.sh
- name: Commit
uses: https://github.com/EndBug/add-and-commit@v9
with:
author_name: forgejo-actions[bot]
author_email: omo50@noreply.nostalgica.net
message: 'actions: auto-update (${{ github.workflow }})'
add: 'modpacks'

View File

@@ -0,0 +1,90 @@
name: "Build"
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/**'
- 'resourcepacks/**'
- 'datapacks/**'
- 'packsquash.toml'
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 2
filter: blob:none
sparse-checkout: |
modpacks
resourcepacks
datapacks
.actions
- name: Meta
id: meta
run: |
CHANGED_FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -E '^(modpacks|resourcepacks|datapacks)/' | head -n 1)
if [ -z "$CHANGED_FILE" ]; then CHANGED_FILE="modpacks/simply-legacy/"; fi
PACK_ID=$(echo "$CHANGED_FILE" | cut -d'/' -f2)
SHORT_SHA=$(git rev-parse --short HEAD)
CLEAN_NAME=$(echo "$PACK_ID" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1')
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
echo "pack_name=$CLEAN_NAME" >> $GITHUB_OUTPUT
- name: Cache Go Binaries
id: cache-go
uses: actions/cache@v4
with:
path: ~/go/bin
key: go-bin-v1-${{ runner.os }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Install Packwiz
run: |
if [ ! -f "$HOME/go/bin/packwiz" ]; then
go install github.com/packwiz/packwiz@latest
fi
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Cache Builder
id: cache-builder
uses: actions/cache@v4
with:
path: ./builder
key: builder-v26.4.0-${{ runner.os }}-${{ hashFiles('.actions/builder/src/**') }}
- name: Setup Builder
if: steps.cache-builder.outputs.cache-hit != 'true'
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi
cd .actions/builder
cargo build --release
cp target/release/builder ../../builder
- name: Run Build
run: |
chmod +x ./builder
./builder ${{ steps.meta.outputs.short_sha }}
- name: Upload
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "${{ steps.meta.outputs.pack_name }}-${{ steps.meta.outputs.short_sha }}"
path: artifacts/

View File

@@ -0,0 +1,37 @@
name: "Validate Datapacks"
on:
push:
branches: [ "main" ]
paths:
- 'datapacks/**'
- '.actions/data/**'
workflow_dispatch:
jobs:
validate:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
sparse-checkout: |
datapacks
.actions/data
.actions/resources
.actions/publish
.actions/builder
.actions/linter
.actions/updater
- name: Install Rust
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Run Validator
run: |
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
cargo run --release --manifest-path .actions/data/Cargo.toml

View File

@@ -1,173 +0,0 @@
name: Publish Legacy Mechanics
on:
push:
tags:
- 'LM-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LM
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LM-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LM-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LM-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=legacy-mechanics" >> $GITHUB_OUTPUT
echo "curseforge_id=legacy-mechanics" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-mechanics
OUTPUT: built-datapacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./datapacks/external/${{ env.PACK_FOLDER }}"
cd "$dir" && python3 -c "
import zipfile, os
with zipfile.ZipFile('$OLDPWD/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip', 'w', zipfile.ZIP_DEFLATED) as zf:
for root, dirs, files in os.walk('.'):
for file in files:
filepath = os.path.join(root, file)
zf.write(filepath, os.path.relpath(filepath, '.'))
"
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Mechanics ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Mechanics ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,172 +0,0 @@
name: Publish Legacy Nether Extended
on:
push:
tags:
- 'LNE-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LNE
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LNE-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LNE-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LNE-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=legacy-nether-extended" >> $GITHUB_OUTPUT
echo "curseforge_id=legacy-nether-extended" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-nether-extended
OUTPUT: built-datapacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./datapacks/external/${{ env.PACK_FOLDER }}"
cd "$dir" && python3 -c "
import zipfile, os
with zipfile.ZipFile('$OLDPWD/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip', 'w', zipfile.ZIP_DEFLATED) as zf:
for root, dirs, files in os.walk('.'):
for file in files:
filepath = os.path.join(root, file)
zf.write(filepath, os.path.relpath(filepath, '.'))
"
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Nether Extended ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Nether Extended ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,173 +0,0 @@
name: Publish Legacy Nether
on:
push:
tags:
- 'LN-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LN
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LN-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LN-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LN-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=legacy-nether" >> $GITHUB_OUTPUT
echo "curseforge_id=legacy-nether" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-nether
OUTPUT: built-datapacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./datapacks/external/${{ env.PACK_FOLDER }}"
cd "$dir" && python3 -c "
import zipfile, os
with zipfile.ZipFile('$OLDPWD/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip', 'w', zipfile.ZIP_DEFLATED) as zf:
for root, dirs, files in os.walk('.'):
for file in files:
filepath = os.path.join(root, file)
zf.write(filepath, os.path.relpath(filepath, '.'))
"
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Nether ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Nether ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
fabric
quilt
forge
neoforge
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -0,0 +1,46 @@
name: Linter
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/**/*.json'
- 'modpacks/**/*.toml'
- 'resourcepacks/**/*.json'
- 'datapacks/**/*.json'
pull_request:
jobs:
lint:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Ensure rust
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
.actions/somnus/core/target
key: ${{ runner.os }}-cargo-${{ hashFiles('.actions/somnus/core/Cargo.toml') }}
- name: Run Somnus Linters
run: |
source "$HOME/.cargo/env" || true
echo "rnning JSON Linter..."
cargo run --manifest-path ./.actions/somnus/core/Cargo.toml --bin json-linter
echo "running TOML Linter..."
cargo run --manifest-path ./.actions/somnus/core/Cargo.toml --bin toml-linter

View File

@@ -1,89 +0,0 @@
name: 2000s Edition Builds
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/2000s-edition/cf/**'
- 'modpacks/2000s-edition/mr/**'
pull_request:
branches: [ "main" ]
paths:
- 'modpacks/2000s-edition/cf/**'
- 'modpacks/2000s-edition/mr/**'
workflow_dispatch:
jobs:
build:
runs-on: technocality
strategy:
matrix:
include:
- { version: "1.21.1-fabric", platform: "mr", packwiz_platform: "modrinth", file_ext: "mrpack" }
- { version: "1.21.1-fabric", platform: "cf", packwiz_platform: "curseforge", file_ext: "zip" }
outputs:
commit_sha: ${{ steps.vars.outputs.commit_sha }}
env:
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: "2000s Edition"
OUTPUT: artifacts
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Create short commit SHA
id: vars
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV
echo "commit_sha=$shortSha" >> $GITHUB_OUTPUT
- name: Build 2K
run: |
SOURCE_DIR="./modpacks/2000s-edition/${{ matrix.platform }}/yarn/${{ matrix.version }}"
TEMP_DIR="build-temp-${{ matrix.platform }}-${{ matrix.version }}"
mkdir -p "$TEMP_DIR"
cp -a "$SOURCE_DIR/." "./$TEMP_DIR/"
cd "./$TEMP_DIR"
packwiz refresh
mkdir -p "../$OUTPUT"
packwiz ${{ matrix.packwiz_platform }} export --output "../${OUTPUT}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }}"
- name: Upload artifacts
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "2K-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}"
path: artifacts
combine:
needs: build
runs-on: technocality
steps:
- name: Download all artifacts
uses: https://code.forgejo.org/actions/download-artifact@v3
with:
path: downloaded-artifacts
- name: Combine and Upload
run: |
mkdir combined
find downloaded-artifacts -type f \( -name "*.mrpack" -o -name "*.zip" \) -exec cp {} combined/ \;
- name: Final Upload
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "2K-${{ needs.build.outputs.commit_sha }}"
path: combined

View File

@@ -1,200 +0,0 @@
name: Publish 2000s Edition
on:
push:
tags:
- '2K-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
pack_name: ${{ steps.extract.outputs.pack_name }}
source_path: ${{ steps.extract.outputs.source_path }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag starts with 2K
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^2K-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern '2K-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract version and type from tag
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^2K-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
echo "pack_name=2000s-Edition" >> $GITHUB_OUTPUT
echo "source_path=2000s-edition" >> $GITHUB_OUTPUT
echo "modrinth_id=2000s-edition" >> $GITHUB_OUTPUT
echo "curseforge_id=2000s-edition" >> $GITHUB_OUTPUT
build:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
strategy:
matrix:
include:
- { version: "1.21.1-fabric", loader: "fabric", platform: "modrinth", file_ext: "mrpack", folder: "mr" }
- { version: "1.21.1-fabric", loader: "fabric", platform: "curseforge", file_ext: "zip", folder: "cf" }
runs-on: technocality
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: ${{ needs.check-tag.outputs.pack_name }}
SOURCE_PATH: ${{ needs.check-tag.outputs.source_path }}
OUTPUT: artifacts
ARTIFACT_DIR: ${{ github.workspace }}/../2k-build-${{ github.sha }}
outputs:
version: ${{ steps.version.outputs.version }}
commit-sha: ${{ steps.version.outputs.commit-sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Check Packwiz
id: check-packwiz
run: |
if [ -f "$HOME/go/bin/packwiz" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Set up Go
if: steps.check-packwiz.outputs.exists != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Cache Packwiz
id: cache-packwiz
uses: https://code.forgejo.org/actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: ${{ runner.os }}-packwiz-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-packwiz-
- name: Install Packwiz
if: steps.cache-packwiz.outputs.cache-hit != 'true'
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Set version and commit SHA
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build modpack
run: |
temp_dir="RC-${{ matrix.platform }}-${{ matrix.version }}-temp"
mkdir $temp_dir
cp -r ./modpacks/2000s-edition/${{ matrix.folder }}/yarn/${{ matrix.version }}/* ./$temp_dir/
cp ./LICENSE ./$temp_dir/
cp ./README.md ./$temp_dir/
cd ./$temp_dir/
packwiz refresh
mkdir -p ../${{ env.OUTPUT }}
packwiz ${{ matrix.platform }} export --output ../${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-${{ matrix.platform }}.${{ matrix.file_ext }}
- name: Publish to Modrinth
if: matrix.platform == 'modrinth' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-modrinth.mrpack
name: "2K ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.1"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: matrix.platform == 'curseforge' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.loader }}-${{ steps.version.outputs.version }}-curseforge.zip
name: "2K ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.loader }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.1"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo release
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,89 +0,0 @@
name: Re-Console+ Builds
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/re-console-plus/cf/**'
- 'modpacks/re-console-plus/mr/**'
pull_request:
branches: [ "main" ]
paths:
- 'modpacks/re-console-plus/cf/**'
- 'modpacks/re-console-plus/mr/**'
workflow_dispatch:
jobs:
build:
runs-on: technocality
strategy:
matrix:
include:
- { version: "1.21.10-fabric", platform: "mr", packwiz_platform: "modrinth", file_ext: "mrpack" }
- { version: "1.21.10-fabric", platform: "cf", packwiz_platform: "curseforge", file_ext: "zip" }
outputs:
commit_sha: ${{ steps.vars.outputs.commit_sha }}
env:
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: "Re-Console+"
OUTPUT: artifacts
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Create short commit SHA
id: vars
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV
echo "commit_sha=$shortSha" >> $GITHUB_OUTPUT
- name: Build RC+
run: |
SOURCE_DIR="./modpacks/re-console-plus/${{ matrix.platform }}/yarn/${{ matrix.version }}"
TEMP_DIR="build-temp-${{ matrix.platform }}-${{ matrix.version }}"
mkdir -p "$TEMP_DIR"
cp -a "$SOURCE_DIR/." "./$TEMP_DIR/"
cd "./$TEMP_DIR"
packwiz refresh
mkdir -p "../$OUTPUT"
packwiz ${{ matrix.packwiz_platform }} export --output "../${OUTPUT}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }}"
- name: Upload artifacts
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "RC-Plus-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}"
path: artifacts
combine:
needs: build
runs-on: technocality
steps:
- name: Download all artifacts
uses: https://code.forgejo.org/actions/download-artifact@v3
with:
path: downloaded-artifacts
- name: Combine and Upload
run: |
mkdir combined
find downloaded-artifacts -type f \( -name "*.mrpack" -o -name "*.zip" \) -exec cp {} combined/ \;
- name: Final Upload
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "RC-Plus-${{ needs.build.outputs.commit_sha }}"
path: combined

View File

@@ -1,201 +0,0 @@
name: Publish Re-Console+
on:
push:
tags:
- 'RC-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
if: (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'RC')) || (github.event_name == 'workflow_dispatch')
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
pack_name: ${{ steps.extract.outputs.pack_name }}
source_path: ${{ steps.extract.outputs.source_path }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag starts with RC
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^RC-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'RC-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract version and type from tag
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^RC-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
echo "pack_name=Re-Console+" >> $GITHUB_OUTPUT
echo "source_path=re-console-plus" >> $GITHUB_OUTPUT
echo "modrinth_id=legacy-minecraft" >> $GITHUB_OUTPUT
echo "curseforge_id=re-console" >> $GITHUB_OUTPUT
build:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
strategy:
matrix:
include:
- { version: "1.21.10-fabric", loader: "fabric", platform: "modrinth", file_ext: "mrpack", folder: "mr" }
- { version: "1.21.10-fabric", loader: "fabric", platform: "curseforge", file_ext: "zip", folder: "cf" }
runs-on: technocality
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: ${{ needs.check-tag.outputs.pack_name }}
SOURCE_PATH: ${{ needs.check-tag.outputs.source_path }}
OUTPUT: artifacts
ARTIFACT_DIR: ${{ github.workspace }}/../rc-build-${{ github.sha }}
outputs:
version: ${{ steps.version.outputs.version }}
commit-sha: ${{ steps.version.outputs.commit-sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Check Packwiz
id: check-packwiz
run: |
if [ -f "$HOME/go/bin/packwiz" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Set up Go
if: steps.check-packwiz.outputs.exists != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Cache Packwiz
id: cache-packwiz
uses: https://code.forgejo.org/actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: ${{ runner.os }}-packwiz-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-packwiz-
- name: Install Packwiz
if: steps.check-packwiz.outputs.exists != 'true'
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Set version and commit SHA
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build modpack
run: |
temp_dir="RC-${{ matrix.platform }}-${{ matrix.version }}-temp"
mkdir $temp_dir
cp -r ./modpacks/re-console-plus/${{ matrix.folder }}/yarn/${{ matrix.version }}/* ./$temp_dir/
cp ./LICENSE ./$temp_dir/
cp ./README.md ./$temp_dir/
cd ./$temp_dir/
packwiz refresh
mkdir -p ../${{ env.OUTPUT }}
packwiz ${{ matrix.platform }} export --output ../${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-${{ matrix.platform }}.${{ matrix.file_ext }}
- name: Publish to Modrinth
if: matrix.platform == 'modrinth' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-modrinth.mrpack
name: "RC Plus ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.10"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: matrix.platform == 'curseforge' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-curseforge.zip
name: "RC Plus ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.loader }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.10"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo release
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,89 +0,0 @@
name: Simply Legacy Builds
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/simply-legacy/cf/**'
- 'modpacks/simply-legacy/mr/**'
pull_request:
branches: [ "main" ]
paths:
- 'modpacks/simply-legacy/cf/**'
- 'modpacks/simply-legacy/mr/**'
workflow_dispatch:
jobs:
build:
runs-on: technocality
strategy:
matrix:
include:
- { version: "1.21.10-fabric", platform: "mr", packwiz_platform: "modrinth", file_ext: "mrpack" }
- { version: "1.21.10-fabric", platform: "cf", packwiz_platform: "curseforge", file_ext: "zip" }
outputs:
commit_sha: ${{ steps.vars.outputs.commit_sha }}
env:
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: "Simply Legacy"
OUTPUT: artifacts
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Create short commit SHA
id: vars
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV
echo "commit_sha=$shortSha" >> $GITHUB_OUTPUT
- name: Build RC+
run: |
SOURCE_DIR="./modpacks/simply-legacy/${{ matrix.platform }}/yarn/${{ matrix.version }}"
TEMP_DIR="build-temp-${{ matrix.platform }}-${{ matrix.version }}"
mkdir -p "$TEMP_DIR"
cp -a "$SOURCE_DIR/." "./$TEMP_DIR/"
cd "./$TEMP_DIR"
packwiz refresh
mkdir -p "../$OUTPUT"
packwiz ${{ matrix.packwiz_platform }} export --output "../${OUTPUT}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }}"
- name: Upload artifacts
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "Simply-Legacy-${{ matrix.version }}-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}"
path: artifacts
combine:
needs: build
runs-on: technocality
steps:
- name: Download all artifacts
uses: https://code.forgejo.org/actions/download-artifact@v3
with:
path: downloaded-artifacts
- name: Combine and Upload
run: |
mkdir combined
find downloaded-artifacts -type f \( -name "*.mrpack" -o -name "*.zip" \) -exec cp {} combined/ \;
- name: Final Upload
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: "Simply-Legacy-${{ needs.build.outputs.commit_sha }}"
path: combined

View File

@@ -1,201 +0,0 @@
name: Publish Simply Legacy
on:
push:
tags:
- 'SL-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
if: (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'SL')) || (github.event_name == 'workflow_dispatch')
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
pack_name: ${{ steps.extract.outputs.pack_name }}
source_path: ${{ steps.extract.outputs.source_path }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag starts with SL
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^SL-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'SL-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract version and type from tag
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^SL-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
echo "pack_name=Simply-Legacy" >> $GITHUB_OUTPUT
echo "source_path=simply-legacy" >> $GITHUB_OUTPUT
echo "modrinth_id=simply-legacy" >> $GITHUB_OUTPUT
echo "curseforge_id=simply-legacy" >> $GITHUB_OUTPUT
build:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
strategy:
matrix:
include:
- { version: "1.21.10-fabric", loader: "fabric", platform: "modrinth", file_ext: "mrpack", folder: "mr" }
- { version: "1.21.10-fabric", loader: "fabric", platform: "curseforge", file_ext: "zip", folder: "cf" }
runs-on: technocality
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
PACK_NAME: ${{ needs.check-tag.outputs.pack_name }}
SOURCE_PATH: ${{ needs.check-tag.outputs.source_path }}
OUTPUT: artifacts
ARTIFACT_DIR: ${{ github.workspace }}/../SL-build-${{ github.sha }}
outputs:
version: ${{ steps.version.outputs.version }}
commit-sha: ${{ steps.version.outputs.commit-sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Check Packwiz
id: check-packwiz
run: |
if [ -f "$HOME/go/bin/packwiz" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Set up Go
if: steps.check-packwiz.outputs.exists != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Cache Packwiz
id: cache-packwiz
uses: https://code.forgejo.org/actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: ${{ runner.os }}-packwiz-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-packwiz-
- name: Install Packwiz
if: steps.check-packwiz.outputs.exists != 'true'
run: go install github.com/packwiz/packwiz@latest
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Set version and commit SHA
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build modpack
run: |
temp_dir="SL-${{ matrix.platform }}-${{ matrix.version }}-temp"
mkdir $temp_dir
cp -r ./modpacks/simply-legacy/${{ matrix.folder }}/yarn/${{ matrix.version }}/* ./$temp_dir/
cp ./LICENSE ./$temp_dir/
cp ./README.md ./$temp_dir/
cd ./$temp_dir/
packwiz refresh
mkdir -p ../${{ env.OUTPUT }}
packwiz ${{ matrix.platform }} export --output ../${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-${{ matrix.platform }}.${{ matrix.file_ext }}
- name: Publish to Modrinth
if: matrix.platform == 'modrinth' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-modrinth.mrpack
name: "Simply Legacy ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.10"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: matrix.platform == 'curseforge' && needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ steps.version.outputs.version }}-curseforge.zip
name: "Simply Legacy ${{ steps.version.outputs.version }} (Fabric)"
version: "${{ steps.version.outputs.version }}-${{ matrix.loader }}-${{ matrix.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: fabric
game-versions: "1.21.10"
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo release
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -0,0 +1,44 @@
name: "png tyhingh"
on:
workflow_dispatch:
jobs:
bulk-nuke:
runs-on: technocality
steps:
- name: grab
uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none
- name: install
run: |
if ! command -v cargo &> /dev/null; then
echo "Rust not found. Bootstrapping..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
. "$HOME/.cargo/env"
if ! command -v oxipng &> /dev/null; then
echo "Installing oxipng..."
cargo install oxipng
fi
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: comp
run: |
. "$HOME/.cargo/env"
oxipng -r -o 4 -v --strip all "resourcepacks/"
- name: commit
uses: https://github.com/EndBug/add-and-commit@v9
with:
author_name: forgejo-actions[bot]
author_email: omo50@noreply.nostalgica.net
message: 'chore: bulk'
add: 'resourcepacks/**/*.png'

View File

@@ -0,0 +1,68 @@
name: "Publish"
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/**/manifest.json'
- 'datapacks/**/manifest.json'
- 'resourcepacks/**/manifest.json'
jobs:
publish:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install packwiz
run: |
if ! command -v packwiz &> /dev/null; then
echo "packwiz not found, installing..."
go install github.com/packwiz/packwiz@latest
else
echo "packwiz already installed."
fi
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install Rust
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build Publisher
run: |
. "$HOME/.cargo/env"
cargo build --release --manifest-path .actions/publish/Cargo.toml
- name: Run Rust Publisher
id: meta
run: |
export PATH=$PATH:$(go env GOPATH)/bin:$HOME/.cargo/bin
./.actions/publish/target/release/publish
- name: Upload
if: "steps.meta.outputs.mr_id != ''"
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ steps.meta.outputs.mr_id }}
modrinth-token: ${{ secrets.MR }}
modrinth-files: "${{ github.workspace }}/${{ steps.meta.outputs.path }}/artifacts/*.mrpack"
curseforge-id: ${{ steps.meta.outputs.cf_id }}
curseforge-token: ${{ secrets.CF }}
curseforge-files: "${{ github.workspace }}/${{ steps.meta.outputs.path }}/artifacts/*.zip"
name: "${{ steps.meta.outputs.name }}"
version: "${{ steps.meta.outputs.ver }}"
changelog: "${{ steps.meta.outputs.notes }}"
loaders: ${{ steps.meta.outputs.type == 'modpack' && 'fabric' || 'minecraft' }}
game-versions: "${{ steps.meta.outputs.mc }}"

View File

@@ -0,0 +1,52 @@
name: "Validate Resource Packs"
on:
push:
branches: [ "main" ]
paths:
- 'resourcepacks/**'
- '.actions/resources/**'
workflow_dispatch:
jobs:
validate:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
sparse-checkout: |
resourcepacks
.actions
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Cache RPV Jar
id: cache-rpv
uses: actions/cache@v4
with:
path: ~/rpv.jar
key: rpv-jar-v1
- name: Build RPV
if: steps.cache-rpv.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/MrKinau/ResourcePackValidator.git /tmp/rpv-src
cd /tmp/rpv-src && mvn package -q -DskipTests
cp target/ResourcePackValidator*.jar ~/rpv.jar
- name: Install Rust
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Run Validator
run: |
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
cargo run --release --manifest-path .actions/resources/Cargo.toml

View File

@@ -1,182 +0,0 @@
name: Publish Faithful Legacy
on:
push:
tags:
- 'FL-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches FL
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^FL-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'FL-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^FL-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=faithful-legacy" >> $GITHUB_OUTPUT
echo "curseforge_id=faithful-legacy" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: ore4j
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Faithful Legacy ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Faithful Legacy ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,202 +0,0 @@
name: Publish LCE Panorama Collection
on:
push:
tags:
- 'LPC-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LPC
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LPC-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LPC-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LPC-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=lce-panorama-collection" >> $GITHUB_OUTPUT
echo "curseforge_id=lce-panorama-collection" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
strategy:
matrix:
include:
- subfolder: "build0016"
display_suffix: "(Build 0016)"
- subfolder: "build0054"
display_suffix: "(Build 0054)"
- subfolder: "tu5"
display_suffix: "(TU5)"
- subfolder: "tu7"
display_suffix: "(TU7)"
- subfolder: "tu12"
display_suffix: "(TU12)"
- subfolder: "tu20"
display_suffix: "(TU20)"
- subfolder: "tu31"
display_suffix: "(TU31)"
- subfolder: "tu46"
display_suffix: "(TU46)"
- subfolder: "tu69"
display_suffix: "(TU69)"
env:
PACK_FOLDER: lce-panorama-collection
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}/${{ matrix.subfolder }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip
name: "LCE Panorama Collection ${{ steps.version.outputs.version }} ${{ matrix.display_suffix }}"
version: "${{ steps.version.outputs.version }}-${{ matrix.subfolder }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip
name: "LCE Panorama Collection ${{ steps.version.outputs.version }} ${{ matrix.display_suffix }}"
version: "${{ steps.version.outputs.version }}-${{ matrix.subfolder }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Legacy Mechanics Addon
on:
push:
tags:
- 'LMA-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LMA
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LMA-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LMA-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LMA-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=legacy-mechanics-addon" >> $GITHUB_OUTPUT
echo "curseforge_id=legacy-mechanics-addon" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-mechanics-addon
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Mechanics Add-on ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Mechanics Add-on ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Legacy Modpack Resources
on:
push:
tags:
- 'LMR-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LMR
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LMR-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LMR-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LMR-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=re-console-resources" >> $GITHUB_OUTPUT
echo "curseforge_id=re-console-resources" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-modpack-resources
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Modpack Resources ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Modpack Resources ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Legacy Skin Packs
on:
push:
tags:
- 'LSP-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LSP
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LSP-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LSP-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LSP-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=modern-skin-packs" >> $GITHUB_OUTPUT
echo "curseforge_id=modern-skin-packs" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-skin-packs
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Skin Packs ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Skin Packs ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Legacy Titles
on:
push:
tags:
- 'LT-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches LT
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^LT-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'LT-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^LT-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=legacy-titles" >> $GITHUB_OUTPUT
echo "curseforge_id=legacy-titles" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: legacy-titles
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Titles ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Legacy Titles ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Modern How To Play
on:
push:
tags:
- 'HTP-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches HTP
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^HTP-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'HTP-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^HTP-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=modern-htp" >> $GITHUB_OUTPUT
echo "curseforge_id=modern-htp" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: modern-how-to-play
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Modern How to Play ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Modern How to Play ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Modern Skin Packs
on:
push:
tags:
- 'MSP-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches MSP
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^MSP-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'MSP-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^MSP-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=modern-skin-packs" >> $GITHUB_OUTPUT
echo "curseforge_id=modern-skin-packs" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: modern-skin-packs
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Modern Skin Packs ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Modern Skin Packs ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,187 +0,0 @@
name: Publish Old UI for Legacy4J
on:
push:
tags:
- 'TU0-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches TU0
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^TU0-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'TU0-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^TU0-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=old-ui-for-legacy4j" >> $GITHUB_OUTPUT
echo "curseforge_id=old-ui-for-legacy4j" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
strategy:
matrix:
include:
- { subfolder: "vanilla-assets", display_suffix: "(Vanilla Assets)" }
- { subfolder: "no-vanilla-assets", display_suffix: "(No Vanilla Assets)" }
runs-on: technocality
env:
PACK_FOLDER: old-l4j-ui
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip
name: "Old L4J UI ${{ steps.version.outputs.version }} ${{ matrix.display_suffix }}"
version: "${{ steps.version.outputs.version }}-${{ matrix.subfolder }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip
name: "Old L4J UI ${{ steps.version.outputs.version }} ${{ matrix.display_suffix }}"
version: "${{ steps.version.outputs.version }}-${{ matrix.subfolder }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Ore4J
on:
push:
tags:
- 'O4J-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches O4J
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^O4J-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'O4J-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^O4J-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=ore4j" >> $GITHUB_OUTPUT
echo "curseforge_id=ore4j" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: ore4j
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Ore4J ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Ore4J ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Tutorial World Addon
on:
push:
tags:
- 'TUT-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches TUT
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^TUT-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'TUT-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^TUT-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=tutorial-world-addon" >> $GITHUB_OUTPUT
echo "curseforge_id=tutorial-world-addon" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: tutorial-world-addon
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Tutorial World Add-on ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Tutorial World Add-on ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -1,182 +0,0 @@
name: Publish Vanilla Live
on:
push:
tags:
- 'VL-*'
workflow_dispatch:
inputs:
version_override:
description: 'Override version number'
required: false
type: string
jobs:
check-tag:
runs-on: technocality
outputs:
should_run: ${{ steps.check.outputs.should_run }}
version: ${{ steps.extract.outputs.version }}
is_alpha: ${{ steps.extract.outputs.is_alpha }}
modrinth_id: ${{ steps.extract.outputs.modrinth_id }}
curseforge_id: ${{ steps.extract.outputs.curseforge_id }}
steps:
- name: Check if tag matches VL
id: check
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
if [[ "$tag" =~ ^VL-[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Tag '$tag' does not match pattern 'VL-X.Y.Z'. Skipping workflow."
fi
else
echo "should_run=true" >> $GITHUB_OUTPUT
fi
- name: Extract
id: extract
if: steps.check.outputs.should_run == 'true'
run: |
if [ "${{ github.event_name }}" = "release" ]; then
tag="${{ github.event.release.tag_name }}"
version=$(echo "$tag" | sed 's/^VL-//')
echo "version=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *"-alpha"* ]]; then
echo "is_alpha=true" >> $GITHUB_OUTPUT
echo "Alpha release detected - will only publish to Forgejo"
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
fi
else
echo "is_alpha=false" >> $GITHUB_OUTPUT
echo "version=dev" >> $GITHUB_OUTPUT
fi
echo "modrinth_id=modern-skin-packs" >> $GITHUB_OUTPUT
echo "curseforge_id=modern-skin-packs" >> $GITHUB_OUTPUT
build-and-publish:
needs: check-tag
if: needs.check-tag.outputs.should_run == 'true'
runs-on: technocality
env:
PACK_FOLDER: vanilla-live
OUTPUT: built-resourcepacks
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set version
id: version
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "commit-sha=$shortSha" >> $GITHUB_OUTPUT
if [ -n "${{ github.event.inputs.version_override }}" ]; then
version="${{ github.event.inputs.version_override }}"
elif [ "${{ github.event_name }}" = "release" ]; then
version="${{ needs.check-tag.outputs.version }}"
else
version="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MR }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Vanilla Live ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Publish to CurseForge
if: needs.check-tag.outputs.is_alpha == 'false'
uses: https://github.com/Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CF }}
files: ${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip
name: "Vanilla Live ${{ steps.version.outputs.version }}"
version: "${{ steps.version.outputs.version }}"
version-type: ${{ github.event_name == 'release' && (contains(github.event.release.tag_name, 'alpha') && 'alpha' || contains(github.event.release.tag_name, 'beta') && 'beta' || 'release') || 'alpha' }}
loaders: |
minecraft
game-versions: |
1.20.1
1.20.4
1.21.1
1.21.3
1.21.4
1.21.5
1.21.8
1.21.10
changelog: ${{ github.event.release.body || format('Development build - {0}', steps.version.outputs.commit-sha) }}
retry-attempts: 3
retry-delay: 10000
fail-mode: warn
- name: Upload to Forgejo
if: github.event_name == 'release'
run: |
file=$(ls ${{ env.OUTPUT }}/*)
release_id=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}" \
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
echo "Uploading $(basename $file) to release $release_id"
curl -s -X POST \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${release_id}/assets?name=$(basename $file)"

View File

@@ -0,0 +1,36 @@
name: "Core Sync"
on:
push:
branches: [ "main" ]
paths:
- 'modpacks/lce-core/**/mods/**'
- 'modpacks/lce-core/**/resourcepacks/**'
jobs:
sync:
runs-on: technocality
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
filter: blob:none
- name: Setup Environment
run: |
[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Run CoreSync
run: |
export PATH=$PATH:$(go env GOPATH)/bin:$HOME/.cargo/bin
cargo run --release --manifest-path .actions/coresync/Cargo.toml
- name: Commit and Push
uses: https://github.com/EndBug/add-and-commit@v9
with:
author_name: forgejo-actions[bot]
author_email: omo50@noreply.nostalgica.net
message: 'actions: auto-update (${{ github.workflow }})'

View File

@@ -1,39 +0,0 @@
name: Auto Refresh
on:
workflow_dispatch:
schedule:
- cron: "0 */2 * * *"
jobs:
auto-update:
runs-on: technocality
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.FORGEJO_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Install Packwiz Wrapper
run: go install github.com/Merith-TK/packwiz-wrapper/cmd/pw@main
- name: Refresh
run: |
chmod +x refresh-all.sh
./refresh-all.sh
- name: Commit Updates
uses: https://github.com/EndBug/add-and-commit@v9.1.4
with:
author_name: forgejo-actions[bot]
author_email: omo50@noreply.nostalgica.net
message: 'Forgejo Actions (${{forgejo.workflow}})'

View File

@@ -1,39 +0,0 @@
name: Auto Update
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
jobs:
auto-update:
runs-on: technocality
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.FORGEJO_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Install Packwiz Wrapper
run: go install github.com/Merith-TK/packwiz-wrapper/cmd/pw@main
- name: Update
run: |
chmod +x update-all.sh
./update-all.sh
- name: Commit Updates
uses: https://github.com/EndBug/add-and-commit@v9.1.4
with:
author_name: forgejo-actions[bot]
author_email: omo50@noreply.nostalgica.net
message: 'Forgejo Actions (${{forgejo.workflow}})'

View File

@@ -1,50 +0,0 @@
name: Build Resource Pack
on:
push:
branches: [ "main" ]
paths:
- 'resourcepacks/**'
- '!resourcepacks/external/lce-resources/**'
workflow_dispatch:
jobs:
build:
runs-on: technocality
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update
apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Build
id: build
run: |
source $HOME/.cargo/env
pack=$(git diff --name-only HEAD~1 HEAD | grep '^resourcepacks/' | sed 's|resourcepacks/[^/]*/\([^/]*\)/.*|\1|' | sort -u | head -1)
dir=$(find ./resourcepacks -type d -name "$pack" | head -1)
echo "pack=$pack" >> $GITHUB_OUTPUT
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$pack.zip'
EOF
packsquash /tmp/options.toml
- name: Upload
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.pack }}
path: ${{ steps.build.outputs.pack }}.zip

View File

@@ -1,32 +0,0 @@
name: Validate Datapacks
on:
push:
branches: [ "main" ]
paths:
- 'datapacks/**'
schedule:
- cron: "0 */4 * * *"
workflow_dispatch:
jobs:
validate:
runs-on: technocality
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: legacy-nether
uses: https://github.com/ChenCMD/datapack-linter@v2
with:
lintDirectory: datapacks/external/legacy-nether
- name: legacy-nether-extended
uses: https://github.com/ChenCMD/datapack-linter@v2
with:
lintDirectory: datapacks/external/legacy-nether-extended
- name: legacy-mechanics
uses: https://github.com/ChenCMD/datapack-linter@v2
with:
lintDirectory: datapacks/external/legacy-mechanics

View File

@@ -1,33 +0,0 @@
name: Validate Resource Packs
on:
push:
branches: [ "main" ]
paths:
- 'resourcepacks/external*'
schedule:
- cron: "0 */4 * * *"
workflow_dispatch:
jobs:
validate:
runs-on: technocality
container:
image: maven:3.9-eclipse-temurin-17
steps:
- name: Checkout
run: |
server=$(echo "${{ github.server_url }}" | sed 's|https://||')
git clone --depth 1 https://oauth2:${{ secrets.FORGEJO_TOKEN }}@${server}/${{ github.repository }} /tmp/workspace
cd /tmp/workspace && git checkout ${{ github.sha }}
- name: Build ResourcePackValidator
run: git clone https://github.com/MrKinau/ResourcePackValidator.git /tmp/rpv-src && cd /tmp/rpv-src && mvn package -q -DskipTests && cp target/ResourcePackValidator*.jar /tmp/rpv.jar
- name: Validate all
run: |
failed=0
for dir in /tmp/workspace/resourcepacks/external/*/; do
[ -d "$dir" ] || continue
echo "Validating $(basename $dir)"
java -jar /tmp/rpv.jar -rp "$dir" -config /tmp/workspace/rpv-config.json || failed=1
done
exit $failed