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

@@ -0,0 +1,14 @@
[package]
name = "builder"
version = "26.4.0"
edition = "2024"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
walkdir = "2.5"
zip = "2.2"
[[bin]]
name = "builder"
path = "builder.rs"

173
.actions/builder/builder.rs Normal file
View File

@@ -0,0 +1,173 @@
// this was written in 60m
use std::{env, fs::{self, File}, io::{Write, Read}, path::Path, process::{Command, exit}};
use std::collections::HashSet;
use walkdir::WalkDir;
use zip::write::SimpleFileOptions;
fn main() {
let args: Vec<String> = env::args().collect();
let short_sha = args.get(1).map(|s| s.as_str()).unwrap_or("unknown");
println!("detecting changed files...");
let output = Command::new("git")
.args(["diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"])
.output()
.expect("Failed to get git diff");
let stdout = String::from_utf8_lossy(&output.stdout);
let mut changed_targets = HashSet::new();
for line in stdout.lines() {
if line.starts_with("external/") || line.starts_with(".actions/") || line.is_empty() {
continue;
}
let parts: Vec<&str> = line.split('/').collect();
if parts.len() >= 2 {
changed_targets.insert((parts[0], parts[1]));
}
}
if changed_targets.is_empty() {
println!(no packs detected in git diff.");
return;
}
let _ = fs::create_dir_all("artifacts");
let mut all_success = true;
for (category, pack_id) in changed_targets {
match category {
"modpacks" => {
if !build_modpack(pack_id, short_sha) { all_success = false; }
},
"resourcepacks" => build_resource_pack(pack_id, short_sha),
"datapacks" => build_datapack(pack_id, short_sha),
_ => println!("category '{}' does not require a build.", category),
}
}
if !all_success {
eprintln!("one or more builds failed.");
exit(1);
} else {
println!("all builds completed successfully.");
}
}
fn build_modpack(pack_id: &str, sha: &str) -> bool {
println!("building modpack: {}", pack_id);
let base_path = format!("modpacks/{}", pack_id);
let mut built_something = false;
for entry in WalkDir::new(&base_path).into_iter().filter_map(|e| e.ok()) {
if entry.file_name() == "manifest.json" {
let manifest_path = entry.path();
let p_dir = manifest_path.parent().unwrap();
let file = match File::open(manifest_path) {
Ok(f) => f,
Err(e) => {
eprintln!("hailed to open {:?}: {}", manifest_path, e);
continue;
}
};
let json: serde_json::Value = match serde_json::from_reader(file) {
Ok(v) => v,
Err(e) => {
eprintln!("invalid JSON in {:?}: {}", manifest_path, e);
continue;
}
};
let mc_ver = json["mc_version"].as_str().unwrap_or("1.20.1");
let p_ver = json["version"].as_str().unwrap_or("1.0.0");
for p in ["mr", "cf"] {
let target_subdir = format!("{}-{}", mc_ver, p);
let target_path = p_dir.join(&target_subdir);
if target_path.exists() {
built_something = true;
let ext = if p == "mr" { "mrpack" } else { "zip" };
let platform = if p == "mr" { "modrinth" } else { "curseforge" };
let output_name = format!("{}-{}-{}-{}-{}.{}", pack_id, mc_ver, p, p_ver, sha, ext);
let _ = Command::new("packwiz").args(["refresh", "-y"]).current_dir(&target_path).status();
let export = Command::new("packwiz")
.args([platform, "export", "--output", &format!("../../../artifacts/{}", output_name)])
.current_dir(&target_path)
.status();
match export {
Ok(s) if !s.success() => {
eprintln!("packwiz export failed for {}", target_subdir);
return false;
},
Err(e) => {
eprintln!("failed to launch packwiz: {}", e);
return false;
},
_ => println!("exported {}", output_name),
}
}
}
}
}
if !built_something {
println!("found no valid targets (mr/cf) or manifest for {}", pack_id);
}
true
}
fn build_resource_pack(pack_id: &str, sha: &str) {
println!("building resource pack: {}", pack_id);
let src = format!("resourcepacks/{}", pack_id);
let dest = format!("artifacts/{}-{}.zip", pack_id, sha);
let status = Command::new("packsquash")
.args(["packsquash.toml", "--pack-directory", &src, "--output-file-path", &dest])
.status()
.expect("Failed to execute PackSquash");
if !status.success() { exit(1); }
}
fn build_datapack(pack_id: &str, sha: &str) {
println!("zipping datapack: {}", pack_id);
let src = format!("datapacks/{}", pack_id);
let dest = format!("artifacts/{}-{}.zip", pack_id, sha);
if let Err(e) = zip_dir(&src, &dest) {
eprintln!(" Failed to zip datapack {}: {}", pack_id, e);
exit(1);
}
}
fn zip_dir(src: &str, dest: &str) -> zip::result::ZipResult<()> {
let file = File::create(dest)?;
let mut zip = zip::ZipWriter::new(file);
let options = SimpleFileOptions::default().compression_method(zip::CompressionMethod::Deflated);
for entry in WalkDir::new(src).into_iter().filter_map(|e| e.ok()) {
let path = entry.path();
let name = path.strip_prefix(Path::new(src)).unwrap();
if path.is_file() {
zip.start_file(name.to_string_lossy(), options)?;
let mut f = File::open(path)?;
let mut buffer = Vec::new();
f.read_to_end(&mut buffer)?;
zip.write_all(&buffer)?;
} else if !name.as_os_str().is_empty() {
zip.add_directory(name.to_string_lossy(), options)?;
}
}
zip.finish()?;
Ok(())
}
// say wallahi bro make this shit work!

12
.actions/data/Cargo.toml Normal file
View File

@@ -0,0 +1,12 @@
[package]
name = "data-validator"
version = "26.4.0"
edition = "2024"
[dependencies]
serde_json = "1.0"
walkdir = "2.5"
[[bin]]
name = "data-validator"
path = "data.rs"

87
.actions/data/data.rs Normal file
View File

@@ -0,0 +1,87 @@
use std::fs;
use std::path::{Path, PathBuf};
use serde_json::Value;
use walkdir::WalkDir;
use std::sync::{Arc, Mutex};
use std::thread;
fn main() {
let data_dir = Path::new("datapacks");
if !data_dir.exists() {
println!("::warning:: no datapacks directory found. skipping.");
return;
}
let entries = fs::read_dir(data_dir).expect("Failed to read datapacks directory");
let mut handles = vec![];
let errors = Arc::new(Mutex::new(Vec::new()));
println!("validating datapacks");
for entry in entries {
let entry = entry.unwrap();
let path = entry.path();
if path.is_dir() && !path.file_name().unwrap().to_str().unwrap().starts_with('.') {
let err_clone = Arc::clone(&errors);
let handle = thread::spawn(move || {
validate_datapack(path, err_clone);
});
handles.push(handle);
}
}
for handle in handles {
handle.join().unwrap();
}
let final_errors = errors.lock().unwrap();
if !final_errors.is_empty() {
println!("\n datapack validation failed:");
for err in final_errors.iter() {
eprintln!("{}", err);
}
std::process::exit(1);
}
println!("\n all datapacks validated!");
}
fn validate_datapack(path: PathBuf, errors: Arc<Mutex<Vec<String>>>) {
let pack_name = path.file_name().unwrap().to_str().unwrap();
println!("::group::Checking Datapack: {}", pack_name);
let mcmeta = path.join("pack.mcmeta");
if !mcmeta.exists() {
errors.lock().unwrap().push(format!("{}: missing pack.mcmeta", pack_name));
}
for entry in WalkDir::new(&path).into_iter().filter_map(|e| e.ok()) {
let f_path = entry.path();
if f_path.extension().map_or(false, |ext| ext == "json") {
let content = fs::read_to_string(f_path).unwrap_or_default();
if let Err(e) = serde_json::from_str::<Value>(&content) {
errors.lock().unwrap().push(format!(
"{}: Invalid JSON in {:?} -> {}",
pack_name, entry.file_name(), e
));
}
}
if f_path.is_file() {
let relative = f_path.strip_prefix(&path).unwrap();
let components: Vec<_> = relative.components().collect();
if components.len() > 1 && components[0].as_os_str() == "data" {
if components.len() < 3 {
errors.lock().unwrap().push(format!(
"{}: File {:?} is outside of a namespace folder!",
pack_name, relative
));
}
}
}
}
println!("::endgroup::");
}

View File

@@ -0,0 +1,12 @@
[package]
name = "linter"
version = "26.4.0"
edition = "2024"
[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
[[bin]]
name = "linter"
path = "linter.rs"

44
.actions/linter/linter.rs Normal file
View File

@@ -0,0 +1,44 @@
// this was written in like 30 minutes
use std::fs;
use std::process::{Command, exit};
use std::path::Path;
fn main() {
let output = Command::new("git")
.args(&["diff", "--name-only", "HEAD~1", "HEAD"])
.output()
.expect("Failed to execute git diff");
let stdout = String::from_utf8_lossy(&output.stdout);
let mut failed = false;
for file_path in stdout.lines() {
let path = Path::new(file_path);
if !path.exists() { continue; }
if file_path.ends_with(".json") || file_path.ends_with(".mcmeta") {
if file_path.starts_with("modpacks/") ||
file_path.starts_with("resourcepacks/") ||
file_path.starts_with("datapacks/") {
println!("::group::Linting {}", file_path);
let content = fs::read_to_string(path).expect("Read Error");
if let Err(e) = serde_json::from_str::<serde_json::Value>(&content) {
eprintln!("::error file={}::INVALID JSON: {}", file_path, e);
failed = true;
}
println!("::endgroup::");
}
}
}
if failed {
eprintln!("Fix yo json chud...");
exit(1);
} else {
println!("Lint success");
}
}
// if this doesnt work i will cry bro i havent used rust since i was 11

View File

@@ -0,0 +1,11 @@
[package]
name = "publish"
version = "26.4.0"
edition = "2024"
[[bin]]
name = "publish"
path = "publish.rs"
[dependencies]
serde_json = "1.0"

157
.actions/publish/publish.rs Normal file
View File

@@ -0,0 +1,157 @@
use serde_json::Value;
use std::env;
use std::fs::{self, OpenOptions};
use std::io::Write;
use std::path::{Path, PathBuf};
use std::process::{Command, ExitStatus};
fn main() {
let diff_output = Command::new("git")
.args(["diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"])
.output()
.expect("failed to run git diff");
let diff_str = String::from_utf8_lossy(&diff_output.stdout);
let manifest_path_str = diff_str.lines().find(|l| l.ends_with("manifest.json"));
let manifest_path_str = match manifest_path_str {
Some(p) => p,
None => {
println!("no manifest.json found in recent commit. skipping.");
std::process::exit(0);
}
};
let manifest_path = Path::new(manifest_path_str);
let p_dir = manifest_path.parent().expect("Could not find parent dir");
let manifest_content = fs::read_to_string(manifest_path).expect("Failed to read manifest");
let manifest: Value = serde_json::from_str(&manifest_content).expect("Failed to parse manifest JSON");
let raw_name = manifest["name"].as_str().unwrap();
let p_name = raw_name.replace(" ", "-");
let p_ver = manifest["version"].as_str().unwrap();
let mc_ver = manifest["mc_version"].as_str().unwrap();
let p_type = manifest["type"].as_str().unwrap();
let mr_id = manifest["modrinth_id"].as_str().unwrap_or("");
let cf_id = manifest["curseforge_id"].as_str().unwrap_or("");
let filename_base = format!("{}-{}-fabric-{}", p_name, mc_ver, p_ver);
let changelog_file = p_dir.join("changelog.md");
let mut notes = if changelog_file.exists() {
fs::read_to_string(&changelog_file).unwrap()
} else {
format!("update for {}", raw_name)
};
let prev_bump = Command::new("git")
.args(["log", "-n", "2", "--format=%H", "--", manifest_path_str])
.output()
.expect("Failed to get git log for manifest");
let prev_hashes = String::from_utf8_lossy(&prev_bump.stdout);
let prev_hash = prev_hashes.lines().nth(1).unwrap_or("HEAD~1");
let logs = Command::new("git")
.args(["log", &format!("{}..HEAD", prev_hash), "--format=%h %s - %an", "--", p_dir.to_str().unwrap()])
.output()
.expect("Failed to get commit logs");
let commit_lines: Vec<&str> = std::str::from_utf8(&logs.stdout)
.unwrap()
.lines()
.filter(|l| l.contains(": "))
.collect();
if !commit_lines.is_empty() {
if !notes.contains("# :purple_circle: Meta-changes") {
notes.push_str("\n\n# :purple_circle: Meta-changes\n");
}
notes.push_str("\n### Automated Commit Log\n");
for line in commit_lines {
notes.push_str(&format!("{}\n", line));
}
}
let workspace = env::var("GITHUB_WORKSPACE").unwrap_or_else(|_| ".".to_string());
let artifacts_dir = Path::new(&workspace).join(p_dir).join("artifacts");
if artifacts_dir.exists() {
fs::remove_dir_all(&artifacts_dir).unwrap();
}
fs::create_dir_all(&artifacts_dir).unwrap();
println!("::group::Building Artifacts");
if p_type == "modpack" {
for platform in &["mr", "cf"] {
let target_folder = format!("{}-{}", mc_ver, platform);
let target_path = p_dir.join(&target_folder);
if target_path.exists() {
// Refresh packwiz
run_cmd("packwiz", &["refresh"], &target_path);
let (export_cmd, ext) = if *platform == "mr" { ("modrinth", "mrpack") } else { ("curseforge", "zip") };
let out_file = artifacts_dir.join(format!("{}-{}.{}", filename_base, platform, ext));
// Export packwiz
run_cmd("packwiz", &[export_cmd, "export", "--output", out_file.to_str().unwrap()], &target_path);
} else {
println!("Skipping {}: folder {} not found", platform, target_path.display());
}
}
} else if p_type == "resourcepack" || p_type == "datapack" {
let out_file = artifacts_dir.join(format!("{}-{}.zip", manifest["id"].as_str().unwrap(), p_ver));
let content_dir = p_dir.join("content");
if content_dir.exists() {
run_cmd("zip", &["-r", out_file.to_str().unwrap(), "."], &content_dir);
} else {
println!("Error: content directory not found at {}", content_dir.display());
}
}
println!("::endgroup::");
if let Ok(out_path) = env::var("GITHUB_OUTPUT") {
let mut out_file = OpenOptions::new()
.append(true)
.create(true)
.open(out_path)
.expect("Could not open GITHUB_OUTPUT");
writeln!(out_file, "mr_id={}", mr_id).unwrap();
writeln!(out_file, "cf_id={}", cf_id).unwrap();
writeln!(out_file, "name={} {}", raw_name, p_ver).unwrap();
writeln!(out_file, "ver={}", p_ver).unwrap();
writeln!(out_file, "mc={}", mc_ver).unwrap();
writeln!(out_file, "type={}", p_type).unwrap();
writeln!(out_file, "path={}", p_dir.to_str().unwrap()).unwrap();
let delimiter = "EOF_NOTES_DELIMITER";
writeln!(out_file, "notes<<{}\n{}\n{}", delimiter, notes.trim(), delimiter).unwrap();
}
}
fn run_cmd(cmd: &str, args: &[&str], dir: &PathBuf) {
let status = Command::new(cmd)
.args(args)
.current_dir(dir)
.status();
match status {
Ok(s) if s.success() => (),
Ok(s) => {
eprintln!("Command '{} {:?}' failed with exit code: {}", cmd, args, s);
std::process::exit(1);
}
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {
eprintln!("CRITICAL: Binary '{}' not found in PATH.", cmd);
eprintln!("Ensure it is installed and added to GITHUB_PATH.");
std::process::exit(1);
}
Err(e) => {
eprintln!("Failed to execute '{}': {}", cmd, e);
std::process::exit(1);
}
}
}

View File

@@ -0,0 +1,13 @@
[package]
name = "resources"
version = "26.4.0"
edition = "2024"
[dependencies]
dirs = "5.0"
serde_json = "1.0"
walkdir = "2.5"
[[bin]]
name = "resource-validator"
path = "resources.rs"

View File

@@ -0,0 +1,97 @@
use std::process::Command;
use std::sync::{Arc, Mutex};
use std::thread;
use std::fs;
use std::path::Path;
fn main() {
let packs_dir = Path::new("resourcepacks");
let jar_path = dirs::home_dir()
.expect("Could not find home directory")
.join("rpv.jar");
let config_path = "resourcepacks/rpv-config.json";
if !packs_dir.exists() {
println!("::warning:: no directory found at {:?}. skipping.", packs_dir);
return;
}
if !jar_path.exists() {
eprintln!("rpv not found {:?}", jar_path);
std::process::exit(1);
}
let entries = fs::read_dir(packs_dir).expect("failed to read resourcepacks directory");
let mut handles = vec![];
let errors = Arc::new(Mutex::new(Vec::new()));
println!("starting validation");
for entry in entries {
let entry = match entry {
Ok(e) => e,
Err(_) => continue,
};
let path = entry.path();
if path.is_dir() && !path.file_name().unwrap().to_str().unwrap().starts_with('.') {
let err_clone = Arc::clone(&errors);
let jar_clone = jar_path.clone();
let config_clone = config_path.to_string();
let handle = thread::spawn(move || {
let pack_name = path.file_name().unwrap().to_str().expect("Invalid filename");
println!("::group::Validating {}", pack_name);
let output = Command::new("java")
.args([
"-jar", jar_clone.to_str().unwrap(),
"-rp", path.to_str().unwrap(),
"-config", &config_clone,
])
.output();
match output {
Ok(out) => {
let stdout = String::from_utf8_lossy(&out.stdout);
let stderr = String::from_utf8_lossy(&out.stderr);
if !stdout.is_empty() { print!("{}", stdout); }
if !stderr.is_empty() { eprintln!("{}", stderr); }
if !out.status.success() {
let mut e = err_clone.lock().unwrap();
e.push(format!("failed validation: {}", pack_name));
}
}
Err(err) => {
let mut e = err_clone.lock().unwrap();
e.push(format!("failed to execute java {}: {}", pack_name, err));
}
}
println!("::endgroup::");
});
handles.push(handle);
}
}
for handle in handles {
if let Err(e) = handle.join() {
eprintln!("thread panic: {:?}", e);
}
}
let final_errors = errors.lock().unwrap();
if !final_errors.is_empty() {
println!("\nfailures detected");
for err in final_errors.iter() {
eprintln!("{}", err);
}
std::process::exit(1);
}
println!("\nall resourcepacks are good to go");
}

View File

@@ -0,0 +1,20 @@
[workspace]
members = [
"core",
]
resolver = "2"
[workspace.dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
walkdir = "2.5"
colored = "2.1"
chrono = "0.4"
git2 = "0.19"
thiserror = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
color-eyre = "0.6"

View File

@@ -0,0 +1,26 @@
[package]
name = "somnus_core"
version = "26.4.0"
edition = "2024"
[lib]
path = "src/lib.rs"
[[bin]]
name = "json-linter"
path = "src/bin/json-linter.rs"
[[bin]]
name = "toml-linter"
path = "src/bin/toml-linter.rs"
[dependencies]
serde_json = "1.0"
toml = "0.8"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
walkdir = "2.5"
git2 = "0.19"
chrono = "0.4"

View File

@@ -0,0 +1,21 @@
use std::path::Path;
use walkdir::WalkDir;
pub fn check_naming_conventions(project_path: &str) -> Vec<String> {
let mut issues = Vec::new();
for entry in WalkDir::new(project_path).into_iter().filter_map(|e| e.ok()) {
let path = entry.path();
if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) {
if file_name.contains(' ') {
issues.push(format!("Space in filename: {:?}", path));
}
if file_name.chars().any(|c| c.is_uppercase()) {
issues.push(format!("Uppercase characters in: {:?}", path));
}
}
}
issues
}

View File

@@ -0,0 +1,47 @@
use std::fs;
use std::path::Path;
use somnus_core::get_changed_files;
fn main() {
if run() {
std::process::exit(1);
}
}
pub fn run() -> bool {
let mut failed = false;
let changed_files = match get_changed_files() {
Ok(files) => files,
Err(e) => {
eprintln!("::error::Failed to retrieve changed files: {}", e);
return true;
}
};
for file_path in changed_files {
let path = Path::new(&file_path);
if !path.exists() { continue; }
if file_path.ends_with(".json") || file_path.ends_with(".mcmeta") {
if ["modpacks/", "resourcepacks/", "datapacks/"]
.iter()
.any(|dir| file_path.starts_with(dir))
{
println!("::group::Linting {}", file_path);
let content = fs::read_to_string(path).expect("Read Error");
if let Err(e) = serde_json::from_str::<serde_json::Value>(&content) {
eprintln!("::error file={}::INVALID JSON: {}", file_path, e);
failed = true;
}
println!("::endgroup::");
}
}
}
if failed {
eprintln!("Fix yo json chud...");
}
failed
}

View File

@@ -0,0 +1,42 @@
use std::fs;
use std::path::Path;
use somnus_core::get_changed_files;
fn main() {
if run() {
std::process::exit(1);
}
}
pub fn run() -> bool {
let mut failed = false;
let changed_files = match get_changed_files() {
Ok(files) => files,
Err(e) => {
eprintln!("::error::Failed to retrieve changed files: {}", e);
return true;
}
};
for file_path in changed_files {
let path = Path::new(&file_path);
if !path.exists() { continue; }
if file_path.ends_with(".toml") {
println!("::group::Linting TOML: {}", file_path);
let content = fs::read_to_string(path).expect("Read Error");
if let Err(e) = content.parse::<toml::Value>() {
eprintln!("::error file={}::INVALID TOML: {}", file_path, e);
failed = true;
}
println!("::endgroup::");
}
}
if failed {
eprintln!("Fix yo toml chud...");
}
failed
}

View File

@@ -0,0 +1,45 @@
use crate::manager::{SomnusManager, Project};
use crate::errors::SomnusError;
use tracing::{info, error, instrument};
pub struct SomnusCommands {
manager: SomnusManager,
}
impl SomnusCommands {
pub fn new() -> Self {
Self {
manager: SomnusManager::new(),
}
}
#[instrument(skip(self))]
pub fn bump_project(&self, category: &str, name: &str, version: &str) -> Result<(), SomnusError> {
info!("Attempting to bump {}/{} to {}", category, name, version);
let project = self.manager.get_project(category, name)
.ok_or_else(|| SomnusError::MissingManifest(format!("{}/{}", category, name)))?;
project.bump(version).map_err(|e| {
error!("Failed to bump project: {}", e);
SomnusError::Io(std::io::Error::new(std::io::ErrorKind::Other, e))
})?;
info!("Successfully bumped {}", name);
Ok(())
}
#[instrument(skip(self))]
pub fn bump_all_in_category(&self, category: &str, version: &str) -> Result<(), SomnusError> {
let projects = self.manager.discover_projects(category);
info!("Found {} projects in {}", projects.len(), category);
for project in projects {
project.bump(version).map_err(|e| {
SomnusError::Io(std::io::Error::new(std::io::ErrorKind::Other, e))
})?;
}
Ok(())
}
}

View File

@@ -0,0 +1,19 @@
use thiserror::Error;
#[derive(Error, Debug)]
pub enum SomnusError {
#[error("IO Error: {0}")]
Io(#[from] std::io::Error),
#[error("Git Error: {0}")]
Git(#[from] git2::Error),
#[error("Serialization Error: {0}")]
Serde(#[from] serde_json::Error),
#[error("Missing Manifest: {0}")]
MissingManifest(String),
#[error("Generic Error: {0}")]
Generic(String),
}

View File

@@ -0,0 +1,32 @@
pub mod manager;
pub mod commands;
pub mod weaver;
pub mod auditor;
pub mod errors;
pub mod state;
pub mod logger;
use git2::Repository;
use crate::errors::SomnusError;
pub fn get_changed_files() -> Result<Vec<String>, SomnusError> {
let repo = Repository::open(".")?;
let head = repo.head()?.peel_to_tree()?;
let parent = repo.find_commit(repo.head()?.target().unwrap())?
.parent(0)?
.tree()?;
let diff = repo.diff_tree_to_tree(Some(&parent), Some(&head), None)?;
let mut changed_files = Vec::new();
diff.foreach(&mut |delta, _| {
if let Some(path) = delta.new_file().path() {
changed_files.push(path.to_string_lossy().to_string());
}
true
}, None, None, None)?;
Ok(changed_files)
}

View File

@@ -0,0 +1,10 @@
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
pub fn init() {
tracing_subscriber::registry()
.with(fmt::layer())
.with(EnvFilter::from_default_env())
.init();
tracing::info!("Somnus Initialized");
}

View File

@@ -0,0 +1,69 @@
use std::path::{Path, PathBuf};
use crate::weaver;
pub enum ProjectCategory {
Modpack,
ResourcePack,
DataPack,
}
pub struct Project {
pub name: String,
pub category: ProjectCategory,
pub path: PathBuf,
}
impl Project {
pub fn bump(&self, version: &str) -> Result<(), String> {
weaver::bump_version(self.path.to_str().unwrap(), version)
}
}
pub struct SomnusManager {
pub root_dir: PathBuf,
}
impl SomnusManager {
pub fn new() -> Self {
Self {
root_dir: PathBuf::from("."),
}
}
pub fn get_project(&self, category: &str, name: &str) -> Option<Project> {
let path = self.root_dir.join(category).join(name);
if path.exists() {
let cat_enum = match category {
"resourcepacks" => ProjectCategory::ResourcePack,
"datapacks" => ProjectCategory::DataPack,
_ => ProjectCategory::Modpack,
};
Some(Project {
name: name.to_string(),
category: cat_enum,
path,
})
} else {
None
}
}
pub fn discover_projects(&self, category: &str) -> Vec<Project> {
let cat_path = self.root_dir.join(category);
let mut projects = Vec::new();
if let Ok(entries) = std::fs::read_dir(cat_path) {
for entry in entries.filter_map(|e| e.ok()) {
if entry.path().is_dir() {
let name = entry.file_name().into_string().unwrap_or_default();
if let Some(p) = self.get_project(category, &name) {
projects.push(p);
}
}
}
}
projects
}
}

View File

View File

@@ -0,0 +1,31 @@
use serde_json::Value;
use std::fs;
use std::path::Path;
pub fn bump_version(project_dir: &str, new_version: &str) -> Result<(), String> {
let manifest_path = Path::new(project_dir).join("manifest.json");
if !manifest_path.exists() {
return Err(format!("no manifest.json found in {}", project_dir));
}
let content = fs::read_to_string(&manifest_path)
.map_err(|e| format!("Read Error: {}", e))?;
let mut json: Value = serde_json::from_str(&content)
.map_err(|e| format!("JSON Parse Error: {}", e))?;
if let Some(v) = json.get_mut("version") {
*v = Value::String(new_version.to_string());
} else {
return Err(format!("'version' key missing in {}", manifest_path.display()));
}
let new_content = serde_json::to_string_pretty(&json)
.map_err(|e| format!("Serialization Error: {}", e))?;
fs::write(&manifest_path, new_content)
.map_err(|e| format!("Write Error: {}", e))?;
Ok(())
}

12
.actions/sync/Cargo.toml Normal file
View File

@@ -0,0 +1,12 @@
[package]
name = "coresync"
version = "26.4.0"
edition = "2024"
[[bin]]
name = "sync"
path = "sync.rs"
[dependencies]
walkdir = "2.5"
serde_json = "1.0"

68
.actions/sync/sync.rs Normal file
View File

@@ -0,0 +1,68 @@
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Command;
use walkdir::WalkDir;
fn main() {
let sync_map = vec![
("modpacks/lce-core/1.21.10-mr", vec![
"modpacks/simply/1.21.10-mr",
"modpacks/rc-plus/1.21.10-mr",
]),
("modpacks/lce-core/1.21.10-cf", vec![
"modpacks/simply/1.21.10-cf",
"modpacks/rc-plus/1.21.10-cf",
]),
];
for (src_str, targets) in sync_map {
let src_path = Path::new(src_str);
if !src_path.exists() {
println!("Skipping source {}: Not found", src_str);
continue;
}
for target_str in targets {
let target_path = Path::new(target_str);
if !target_path.exists() { continue; }
println!("Syncing {} -> {}", src_str, target_str);
sync_subfolder(src_path, target_path, "mods");
sync_subfolder(src_path, target_path, "resourcepacks");
sync_subfolder(src_path, target_path, "resources");
refresh_packwiz(target_path);
}
}
}
fn sync_subfolder(src_root: &Path, dst_root: &Path, folder: &str) {
let src = src_root.join(folder);
let dst = dst_root.join(folder);
if !src.exists() { return; }
for entry in WalkDir::new(&src)
.into_iter()
.filter_map(|e| e.ok())
.filter(|e| !e.path().is_dir())
{
let src_file = entry.path();
let relative = src_file.strip_prefix(src_root).unwrap();
let target_file = dst_root.join(relative);
if let Some(parent) = target_file.parent() {
fs::create_dir_all(parent).expect("Failed to create dirs");
}
fs::copy(src_file, &target_file).expect("Failed to copy file");
}
}
fn refresh_packwiz(dir: &Path) {
let _ = Command::new("packwiz")
.arg("refresh")
.current_dir(dir)
.status();
}

View File

@@ -0,0 +1,8 @@
[package]
name = "updater"
version = "26.4.0"
edition = "2024"
[[bin]]
name = "updater"
path = "updater.rs"

View File

@@ -0,0 +1,87 @@
use std::process::Command;
use std::sync::{Arc, Mutex};
use std::thread;
fn main() {
let modpacks = vec!["simply", "rc-plus", "2k", "rekindled"];
let max_concurrent = 4;
let modpacks_queue = Arc::new(Mutex::new(modpacks.into_iter()));
let errors = Arc::new(Mutex::new(Vec::new()));
let mut workers = vec![];
println!("starting throttled parallel updates ({} at a time)...", max_concurrent);
for i in 0..max_concurrent {
let queue_clone = Arc::clone(&modpacks_queue);
let err_clone = Arc::clone(&errors);
let handle = thread::spawn(move || {
loop {
let pack = {
let mut queue = queue_clone.lock().unwrap();
queue.next()
};
let pack = match pack {
Some(p) => p,
None => break,
};
let path = format!("modpacks/{}", pack);
println!("[Worker {}] starting: {}", i, pack);
if !std::path::Path::new(&path).exists() {
let mut e = err_clone.lock().unwrap();
e.push(format!("directory missing: {}", path));
continue;
}
let refresh = Command::new("pw")
.args(["batch", "refresh", "-y"])
.current_dir(&path)
.status();
let update = Command::new("pw")
.args(["batch", "update", "-a", "-y"])
.current_dir(&path)
.status();
let failed = match (refresh, update) {
(Ok(s1), Ok(s2)) => !s1.success() || !s2.success(),
(Err(e), _) => {
println!("[Worker {}] refresh failed for {}: {}", i, pack, e);
true
},
(_, Err(e)) => {
println!("[Worker {}] update failed for {}: {}", i, pack, e);
true
}
};
if failed {
let mut e = err_clone.lock().unwrap();
e.push(format!("failed: {}", pack));
} else {
println!("[Worker {}] done: {}", i, pack);
}
}
});
workers.push(handle);
}
for handle in workers {
handle.join().unwrap();
}
let final_errors = errors.lock().unwrap();
if !final_errors.is_empty() {
eprintln!("\nsummary of failures");
for err in final_errors.iter() {
eprintln!("{}", err);
}
std::process::exit(1);
} else {
println!("\nall updates finished successfully.");
}
}

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

View File

@@ -31,7 +31,7 @@ body:
label: Minecraft Version label: Minecraft Version
description: What version of Minecraft are you running? description: What version of Minecraft are you running?
options: options:
- 1.21.11 - 26.1.1
- 1.21.10 - 1.21.10
- 1.21.8 - 1.21.8
- 1.21.5 - 1.21.5
@@ -68,10 +68,8 @@ body:
- Re-Console Modrinth - Re-Console Modrinth
- Re-Console Curseforge - Re-Console Curseforge
- Rekindled Legacy (List TU in your bug report) - Rekindled Legacy (List TU in your bug report)
- Simply Legacy - Simply Legacy Modrinth
- Silver Lining - Simply Legacy Curseforge
- OptiVulkan
- Create & Destroy
default: 0 default: 0
validations: validations:
required: true required: true

42
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: 'Close issues'
on:
schedule:
- cron: '60 * * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: stale
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
with:
stale-issue-message: "This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions."
close-issue-message: "This has been automatically closed because it has not had recent activity. Please feel free to update or reopen it."
stale-pr-message: "This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions."
close-pr-message: "This has been automatically closed because it has not had recent activity. Please feel free to update or reopen it."
stale-issue-label: 'stale'
stale-pr-label: 'stale'
remove-issue-stale-when-updated: 'true'
exempt-issue-labels: 'enhancement,bug,minor bug'
days-before-issue-stale: 90
days-before-issue-close: 30
days-before-pr-stale: 90
days-before-pr-close: 30
operations-per-run: 20
ascending: 'false'
enable-statistics: 'true'
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5.0.1
with:
issue-inactive-days: '365'
issue-lock-reason: 'resolved'
process-only: 'issues'

1
.gitignore vendored
View File

@@ -18,7 +18,6 @@ modpacks/export-all.sh
# Visual Studio Code # Visual Studio Code
.settings/ .settings/
.vscode/ .vscode/
bin/
.classpath .classpath
.project .project
# Logs and errors # Logs and errors

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "Resourcepacks"]
path = Resourcepacks
url = https://git.nostalgica.net/Lasting-Legacy/Resourcepacks.git

View File

@@ -3,5 +3,6 @@
The Content Monorepo has some guidelines and suggestions to keep the commits of the 30+ projects hosted here trackable. The Content Monorepo has some guidelines and suggestions to keep the commits of the 30+ projects hosted here trackable.
### Commit Tagging ### Commit Tagging
Please adhere to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) handbook for writing your commits. Please also tag your commits according to the project, ie, if you are fixing an issue on Re-Console, do fix(re-console), or fix(rc):.
Please adhere to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) handbook for writing your commits. Please also tag your commits according to the project, ie, if you are fixing an issue on Re-Console Plus, do fix(rc-plus), or fix(rc):.

154
README.md
View File

@@ -1,139 +1,39 @@
# Content-Monorepo # Lasting Legacy/LCE-Monorepo
This is the repository hosting all of the different Reverie modpacks, and their source code. This is the repository hosting all of the different Lasting Legacy modpacks, resource packs, and datapacks.
## Notice ## Notice
Development is held on [git.nostalgica.net](https://git.nostalgica.net/Lasting-Legacy/Content-Monorepo), GitHub and Codeberg are mirrors. Please go to our [GitHub Issues](https://github.com/Nostalgica-Reverie/Content-Monorepo/issues) page to report any issues. Development is held on [git.nostalgica.net](https://git.nostalgica.net/Lasting-Legacy/Content-Monorepo), GitHub and Codeberg are mirrors. Please go to our [GitHub Issues](https://github.com/Nostalgica-Reverie/Content-Monorepo/issues) page to report any issues.
## Modpack Projects # General
This repository currently holds the source for these modpacks: This repository hosts all the source and files for all of our resource packs, data packs, modpacks and more. This readme is primarily intended for internal developer usage.
- 2000s Edition
- Create & Destroy
- Re-Console
- Re-Console+
- Rekindled Legacy
- Silver Lining
- Simply Legacy
Each of these packs can be found in their respective folders in the ``modpacks`` directory. Each modpack may be under a different license, so if you are looking to fork or PR, please read the LICENSE file in the respective folder. ## Contributing
First, please refer to the CONTRIBUTING.md file in the repository. This will tell you some basics
## Resource Pack Projects ## Actions
This repository currently holds the source for these resource packs: The repository makes usage of Forgejo actions, for CI/CD and general QoL improvements to our dev process.
- 1080p KBM Tooltips
- Extra Controller Tooltips
- Faithful Legacy
- Fixed Chest Models
- Hybrid Aspects
- Legacy Modpack Lang
- Legacy Modpack Resources
- Legacy Panorama
- Legacy Skin Packs
- Legacy Titles
- Modern How to Play
- Modern Skin Packs
- Ore4J
- Old GUI for Legacy4J
- Playstation Skin Packs
- Tooltips Enhanced
- Tutorial World Addon
- Vanilla Live
- Xbox Skin Packs
## Current Functions
Each of these packs can be found in their respective folders in the ``resourcepacks`` directory. Each pack may be under a different license, so if you are looking to fork or PR, please read the LICENSE file in the respective folder. Internal packs are generally internally used among modpacks, and External are published to sites.
We also host every LCE port here.
| Icon | Name | Developers | Downloads | Links |
|:-:|-|-|-|-|
| <img src="https://cdn.modrinth.com/data/meEXwbr9/770e36a855375d291ea82a6cb093a9340b5e38cc.png" width="64" title="Plastic Texture Pack Logo" alt="Plastic Texture Pack Logo"> | [Plastic Texture Pack](https://modrinth.com/resourcepack/plastic-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/plastic-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/plastic-texture-pack) [![CurseForge Downloads](https://img.shields.io/curseforge/dt/1172344?logo=CurseForge&label=Downloads)](https://www.curseforge.com/minecraft/texture-packs/plastic-texture-pack-lce) |<a href="https://modrinth.com/resourcepack/plastic-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> <a href="https://www.curseforge.com/minecraft/texture-packs/plastic-texture-pack-lce"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/curseforge_vector.svg" title="curseforge" alt="curseforge" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/mXZavX3c/77241b565d355ba5369dbb1bee133a266f08aea9.png" width="64" title="Halloween Mash-up Logo" alt="Halloween Mash-up Logo"> | [Halloween Mash-up](https://modrinth.com/resourcepack/halloween-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/halloween-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/halloween-mash-up) |<a href="https://modrinth.com/resourcepack/halloween-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/wl6YG9AY/57a0658dbfb9fc3d7b2ca4ddfa9f7439540ca8c7.png" width="64" title="Natural Texture Pack Logo" alt="Natural Texture Pack Logo"> | [Natural Texture Pack](https://modrinth.com/resourcepack/natural-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/natural-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/natural-texture-pack) |<a href="https://modrinth.com/resourcepack/natural-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/pE8Ji9UH/267efb1f2bbe4b0c30fd00167e038a23b2a24e7e.png" width="64" title="Festive Mash-up Logo" alt="Festive Mash-up Logo"> | [Festive Mash-up](https://modrinth.com/resourcepack/festive-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/festive-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/festive-mash-up) |<a href="https://modrinth.com/resourcepack/festive-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/kFbEIMmd/2d3d64ef4a05a60e422abcb0c6fc5259cea9b1a0.png" width="64" title="Fantasy Texture Pack Logo" alt="Fantasy Texture Pack Logo"> | [Fantasy Texture Pack](https://modrinth.com/resourcepack/fantasy-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/fantasy-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/fantasy-texture-pack) |<a href="https://modrinth.com/resourcepack/fantasy-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/IcRlkcNt/7eef503a801aef36b478cae945f7118310883113.png" width="64" title="City Texture Pack Logo" alt="City Texture Pack Logo"> | [City Texture Pack](https://modrinth.com/resourcepack/city-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/city-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/city-texture-pack) |<a href="https://modrinth.com/resourcepack/city-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/WtfCCeNe/a7917d680797b682fbc6752d36b2405583bb07a5.png" width="64" title="Greek Mythology Mash-up Logo" alt="Greek Mythology Mash-up Logo"> | [Greek Mythology Mash-up](https://modrinth.com/resourcepack/greek-mythology-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/greek-mythology-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/greek-mythology-mash-up) |<a href="https://modrinth.com/resourcepack/greek-mythology-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/NGIRqFgR/9a8258afd683e1271bef251184853c3f33a8a4ac.png" width="64" title="Candy Texture Pack Logo" alt="Candy Texture Pack Logo"> | [Candy Texture Pack](https://modrinth.com/resourcepack/candy-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/candy-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/candy-texture-pack) |<a href="https://modrinth.com/resourcepack/candy-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/kRsZVu69/678f03f5cd254512cc56c65c4ff7928eb236849d.png" width="64" title="Chinese Mythology Mash-up Logo" alt="Chinese Mythology Mash-up Logo"> | [Chinese Mythology Mash-up](https://modrinth.com/resourcepack/chinese-mythology-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/chinese-mythology-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/chinese-mythology-mash-up) |<a href="https://modrinth.com/resourcepack/chinese-mythology-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/I8Wm3eT9/e0959f629f5ba76a8e7769c9c5656158a555f93b.png" width="64" title="Cartoon Texture Pack Logo" alt="Cartoon Texture Pack Logo"> | [Cartoon Texture Pack](https://modrinth.com/resourcepack/cartoon-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/cartoon-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/cartoon-texture-pack) |<a href="https://modrinth.com/resourcepack/cartoon-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/1COPjvze/4d3ef8640575d16c07f8706e04327bd211853b68.png" width="64" title="Norse Mythology Mash-up Logo" alt="Norse Mythology Mash-up Logo"> | [Norse Mythology Mash-up](https://modrinth.com/resourcepack/norse-mythology-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/norse-mythology-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/norse-mythology-mash-up) |<a href="https://modrinth.com/resourcepack/norse-mythology-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/ohS9Jkb7/b7faed31431b190e56fd7f1d93e3e45e223a175d.png" width="64" title="Super Cute Texture Pack Logo" alt="Super Cute Texture Pack Logo"> | [Super Cute Texture Pack](https://modrinth.com/resourcepack/super-cute) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/super-cute?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/super-cute) |<a href="https://modrinth.com/resourcepack/super-cute"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/2F04lb0o/34b7125f8edee40eb0f5f8435bdebcd445b5c836.png" width="64" title="Pattern Texture Pack Logo" alt="Pattern Texture Pack Logo"> | [Pattern Texture Pack](https://modrinth.com/resourcepack/pattern-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/pattern-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/pattern-texture-pack) |<a href="https://modrinth.com/resourcepack/pattern-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/bkDlbAtL/720a4e007a8fd9f960c7d20ffe65e6683db1d86c.png" width="64" title="Pirates of the Caribbean Mash-up Logo" alt="Pirates of the Caribbean Mash-up Logo"> | [Pirates of the Caribbean Mash-up](https://modrinth.com/resourcepack/pirates-of-the-caribbean-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/pirates-of-the-caribbean-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/pirates-of-the-caribbean-mash-up) |<a href="https://modrinth.com/resourcepack/pirates-of-the-caribbean-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/27e5KETs/31d474642f171b5501b9592a871f80a43c5b6e27.png" width="64" title="Mass Effect Mash-up Logo" alt="Mass Effect Mash-up Logo"> | [Mass Effect Mash-up](https://modrinth.com/resourcepack/mass-effect-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/mass-effect-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/mass-effect-mash-up) |<a href="https://modrinth.com/resourcepack/mass-effect-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/iWaY0S0z/60dc005c96d9bc5c95807c711a36e5fb2e414f24.png" width="64" title="Steampunk Texture Pack Logo" alt="Steampunk Texture Pack Logo"> | [Steampunk Texture Pack](https://modrinth.com/resourcepack/steampunk-texture-pack) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/steampunk-texture-pack?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/steampunk-texture-pack) |<a href="https://modrinth.com/resourcepack/steampunk-texture-pack"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a> |
| <img src="https://cdn.modrinth.com/data/1Ee44YG5/d511ee3a7d36c90b76a84a640bf9586995da0f44.png" width="64" title="Egyptian Mythology Mash-up Logo" alt="Egyptian Mythology Mash-up Logo"> | [Egyptian Mythology Mash-up](https://modrinth.com/resourcepack/egyptian-mythology-mash-up) | [BrandonItaly](https://github.com/brandonitaly) | [![Modrinth Downloads](https://img.shields.io/modrinth/dt/egyptian-mythology-mash-up?logo=Modrinth&label=Downloads)](https://modrinth.com/resourcepack/egyptian-mythology-mash-up) |<a href="https://modrinth.com/resourcepack/egyptian-mythology-mash-up"><img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy-minimal/available/modrinth_vector.svg" title="modrinth" alt="modrinth" width="32" height="32"></a>
## Datapack Projects
This repository currently holds the source for these data packs:
- Legacy Nether
- Legacy Nether: Extended
- Legacy Mechanics
Each of these packs can be found in their respective folders in the ``datapacks`` directory. Each pack may be under a different license, so if you are looking to fork or PR, please read the LICENSE file in the respective folder. Internal packs are generally internally used among modpacks, and External are published to sites.
### Downloads
#### Stable builds
The latest stable releases of these modpacks can be found on our dedicated Modrinth pages.
### Reporting Issues
If you do not need tech support and would like to report an issue (bug, crash, etc.) or otherwise request a feature for any modpack, then we encourage you to open an issue on the
[project issue tracker](https://codeberg.org/Nostalgica-Reverie/Legacy-Modpack-Monorepository/issues).
### Hardware Compatibility
Our modpacks, due to utilizing the powerful [Sodium](https://modrinth.com/mod/sodium), [Embeddium](https://modrinth.com/mod/embeddium) or even [Vulkan](https://modrinth.com/mod/vulkanmod) mod, is only compatible with specific graphics cards or other hardware variants.
All of our Sodium/Embeddium packs will work with any GPU that supports ***OpenGL 4.5 or newer.***
Most graphics cards released in the past 12 years will meet these requirements.
### Minimum Requirements (Sodium)
- INTEL HD Graphics 500 Series (Skylake) or newer
- NVIDIA GeForce 400 Series (Fermi) or newer
- AMD Radeon HD 7000 Series (GCN 1) or newer
If you are running into problems, you should make sure that your graphics drivers are up-to-date. I also recommend taking a look at [this page](https://github.com/CaffeineMC/sodium/wiki/Driver-Compatibility) on the Sodium wiki.
For our Vulkan modpacks, they will support any GPU that supports Vulkan 1.2 or above.
# Nostalgica Reverie
Consider joining the [Nostalgica Reverie Discord](https://discord.gg/6pRkrYxbGW) for sneak peeks and updates on development! By joining, you can:
- Get installation help and technical support for alot of nostalgic projects
- Get the latest updates about development
- Talk with and collaborate with our team
- And just hang out with the rest of our community!
## Supported Versions
Our modpacks support a wide array of versions and modloaders.
### LCE Modpacks
- Re-Console+ supports 1.21.10 on Fabric.
- Re-Console supports 1.20.1, 1.20.4, 1.21.1, 1.21.3, 1.21.4, 1.21.5, 1.21.8, and formerly 1.21.10, on Fabric, NeoForge, Forge and Quilt.
- Rekindled Legacy currently has re-creations for Build 0033, Build 0035, GDC 2012, TU0, TU1, TU2, and TU3, on 1.21.1 NeoForge.
- Simply Legacy supports 1.21.10 on Fabric
- 2000s Edition currently has a recreation of TU9 for 1.21.1 on Fabric.
### Versioning
Versioning is project specific, which is up to each individual developer to choose.
### Tooling
This project uses many Forgejo actions scripts to help automate our processes. A rough list of this includes:
- Auto Update (for modpacks)
- Auto Refresh (for modpacks)
- Auto Publish - Auto Publish
- Auto Validate (catches inconsistencies in our resource packs or datapacks) - Auto Update and Auto Refresh*
- Auto Build
- Datapack and Resourcepack validator
- JSON Linter
- Resource Pack Compressor**
*for modpacks only
**on publish and build only
### Special Thanks ### Using Auto Publish (for devs)
Special thanks to: Every project in the repo must have a manifest.json. This manifest.json specifies stuff that our publish.yml then uses to auto publish. Once it is set up, you may simply bump version in the manifest.json and it will update across platforms.
- jellysquid3 for creating Sodium ### Incremental Builds
- comp500 for packwiz 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.
- DexrnZacAttack for making PackItUp License
- Technocality for GitHub actions
## License ### Credits
As all of these modpacks are different, the license may vary. Most packs are under GPL-3.0, or MIT. Please check the pack folder or the pages on official sites (Modrinth, CurseForge) for the license. justfile from skywardmc, stale.yml from JEI. Licensed under MIT
All actions are licensed under AGPL-3.0. # License
As all of these projects are different, the license may vary. Most packs are under GPL-3.0, or MIT. Please check the pack folder or the pages on official sites (Modrinth, CurseForge) for the license.
All* actions are licensed under AGPL-3.0 and written in Rust.

View File

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 207 KiB

View File

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Some files were not shown because too many files have changed in this diff Show More