diff --git a/.forgejo/ISSUE_TEMPLATE/bug-report.yml b/.forgejo/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000..c93c86c32 --- /dev/null +++ b/.forgejo/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,76 @@ +name: Bug Report +description: File a bug report. +title: "[Issue]: " +labels: ["bug"] +body: + - type: input + id: issue + attributes: + label: What is the issue? + description: Please describe what the issue is. + placeholder: ex. Game crashes when [...] + validations: + required: true + - type: textarea + id: how-to-reproduce + attributes: + label: To Reproduce + description: Please describe what steps to take to recreate the issue. + placeholder: | + Steps to reproduce the behavior: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: dropdown + id: mc-version + attributes: + label: Minecraft Version + description: What version of Minecraft are you running? + options: + - 1.21.10 + - 1.21.8 + - 1.21.5 + - 1.21.4 + - 1.21.3 + - 1.21.1 + - 1.20.4 + - 1.20.1 + default: 0 + validations: + required: true + - type: dropdown + id: modpack + attributes: + label: Modpack + description: What Modpack and what version are you on? + options: + - Re-Console Modrinth + - Re-Console Curseforge + - Simply Legacy + - Rekindled Legacy + default: 0 + validations: + required: true + - type: textarea + id: logs + attributes: + label: Log and crash report + description: Please upload your log or crash report to mclo.gs and paste the link here. + validations: + required: true + - type: textarea + id: extras + attributes: + label: Additional Context + description: Put any extra info you feel is neccessary here. + - type: checkboxes + id: terms + attributes: + label: Acknowledgement + description: If you do not fill out this form correctly, your issue will be immediately closed. + options: + - label: I understand and have fully filled out the form, including the issue name. + required: true diff --git a/.forgejo/ISSUE_TEMPLATE/config.yml b/.forgejo/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..3ba13e0ce --- /dev/null +++ b/.forgejo/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.forgejo/PULL_REQUEST_TEMPLATE/bug_fix.md b/.forgejo/PULL_REQUEST_TEMPLATE/bug_fix.md new file mode 100644 index 000000000..67b823b1b --- /dev/null +++ b/.forgejo/PULL_REQUEST_TEMPLATE/bug_fix.md @@ -0,0 +1,15 @@ +--- +name: Bug fix +about: Use this template if you're creating a pull request which fixes another bug or issue +title: "[Bug Fix]: " +labels: bug +assignees: '' + +--- + +### Linked Issues +Provide links to the issue(s) which will be closed upon merging this pull request. There must be an open issue for +pull requests which fix bugs or other issues. + +### Proposed Changes +Provide a detailed description of what your pull request changes. diff --git a/.forgejo/PULL_REQUEST_TEMPLATE/new_feature.md b/.forgejo/PULL_REQUEST_TEMPLATE/new_feature.md new file mode 100644 index 000000000..21f531195 --- /dev/null +++ b/.forgejo/PULL_REQUEST_TEMPLATE/new_feature.md @@ -0,0 +1,13 @@ +--- +name: Bug fix +about: Use this template if you're creating a pull request which adds a feature or other enhancement +title: "[New Feature]: " +labels: enhancement +assignees: '' + +--- + + +### Proposed Changes + +Provide a detailed description of what your pull request changes. diff --git a/.forgejo/workflows/auto-update.yml b/.forgejo/workflows/auto-update.yml new file mode 100644 index 000000000..946ef61c5 --- /dev/null +++ b/.forgejo/workflows/auto-update.yml @@ -0,0 +1,111 @@ +name: Auto Update + +on: + workflow_dispatch: + +jobs: + auto-update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_PAT }} + fetch-depth: 1 + + # Cache Packwiz binary to avoid Go setup and compilation + - name: Cache Packwiz Binary + uses: actions/cache@v4 + id: cache-packwiz + with: + path: ~/go/bin/packwiz + key: packwiz-binary-${{ runner.os }}-v1 + restore-keys: | + packwiz-binary-${{ runner.os }}- + + # Only set up Go and install Packwiz if not cached + - name: Set up Go + if: steps.cache-packwiz.outputs.cache-hit != 'true' + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: false + + - name: Install Packwiz + if: steps.cache-packwiz.outputs.cache-hit != 'true' + run: go install github.com/packwiz/packwiz@latest + + # Add Packwiz to PATH (whether cached or freshly installed) + - name: Add Packwiz to PATH + run: echo "$HOME/go/bin" >> $GITHUB_PATH + + - name: Update All Modpacks + run: | + BATCH_SIZE=2 + WAIT_TIME=18 + + vpacks=(re-console re-console-lite) + pfvs=(curseforge modrinth) + mlvs=(fabric) + mcvs=(1.20.1 1.20.4 1.21.1 1.21.3 1.21.4 1.21.5 1.21.8) + + batch=() + run_batch() { + echo "Running batch of ${#batch[@]} updates" + pids=() + logs=() + + for idx in "${!batch[@]}"; do + log_file="update_log_$idx.txt" + logs+=("$log_file") + + bash -c "${batch[$idx]}" > "$log_file" 2>&1 & + pids+=($!) + done + + # Wait for all background tasks to finish + for pid in "${pids[@]}"; do + wait $pid + done + + # Show logs + for idx in "${!logs[@]}"; do + echo + echo "==== Output for Task $((idx + 1)) ====" + cat "${logs[$idx]}" + echo "==== End Output for Task $((idx + 1)) ====" + echo + done + + echo "Batch complete, waiting ${WAIT_TIME} seconds..." + echo + sleep ${WAIT_TIME} + batch=() + } + + for i in "${vpacks[@]}"; do + for q in "${pfvs[@]}"; do + for w in "${mlvs[@]}"; do + for e in "${mcvs[@]}"; do + DIR="./versions/vanilla/src/$i/$q/$w/$e" + if [ -d "$DIR" ]; then + echo "Queued: $i $q $w $e" + batch+=("cd \"$DIR\" && packwiz refresh -y && packwiz update -a -y") + if [ "${#batch[@]}" -eq "$BATCH_SIZE" ]; then + run_batch + fi + fi + done + done + done + done + + # Final batch if anything remains + if [ "${#batch[@]}" -gt 0 ]; then + run_batch + fi + + - name: Commit Updates + uses: EndBug/add-and-commit@v9.1.4 + with: + default_author: github_actions \ No newline at end of file diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 000000000..c2015ab8d --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,524 @@ +name: Publish Re-Console + +on: + release: + types: [published] + workflow_dispatch: + inputs: + version_override: + description: 'Override version number' + required: false + type: string + +jobs: + check-tag: + runs-on: ubuntu-latest + outputs: + should_run: ${{ steps.check.outputs.should_run }} + version: ${{ steps.extract.outputs.version }} + is_alpha: ${{ steps.extract.outputs.is_alpha }} + is_lite: ${{ steps.extract.outputs.is_lite }} + 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 or Lite + id: check + run: | + if [ "${{ github.event_name }}" = "release" ]; then + tag="${{ github.event.release.tag_name }}" + if [[ "$tag" =~ ^(RC|Lite)-[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' or 'Lite-X.Y.Z'. Skipping workflow." + fi + else + # Always run for workflow_dispatch + 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 }}" + + # Check if it's a Lite release + if [[ "$tag" =~ ^Lite- ]]; then + echo "is_lite=true" >> $GITHUB_OUTPUT + echo "pack_name=Re-Console-Lite" >> $GITHUB_OUTPUT + echo "source_path=re-console-lite" >> $GITHUB_OUTPUT + echo "modrinth_id=legacy-minecraft-lite" >> $GITHUB_OUTPUT + echo "curseforge_id=re-console-lite" >> $GITHUB_OUTPUT + # Extract version after "Lite-" + version=$(echo "$tag" | sed 's/^Lite-//') + else + echo "is_lite=false" >> $GITHUB_OUTPUT + echo "pack_name=Re-Console" >> $GITHUB_OUTPUT + echo "source_path=re-console" >> $GITHUB_OUTPUT + echo "modrinth_id=legacy-minecraft" >> $GITHUB_OUTPUT + echo "curseforge_id=re-console" >> $GITHUB_OUTPUT + # Extract version after "RC-" + version=$(echo "$tag" | sed 's/^RC-//') + fi + + echo "version=$version" >> $GITHUB_OUTPUT + + # Check if it's an alpha release + if [[ "$version" == *"-alpha"* ]]; then + echo "is_alpha=true" >> $GITHUB_OUTPUT + echo "Alpha release detected - will only publish to GitHub" + else + echo "is_alpha=false" >> $GITHUB_OUTPUT + fi + else + # Default values for workflow_dispatch + echo "is_lite=false" >> $GITHUB_OUTPUT + echo "is_alpha=false" >> $GITHUB_OUTPUT + echo "pack_name=Re-Console" >> $GITHUB_OUTPUT + echo "source_path=re-console" >> $GITHUB_OUTPUT + echo "modrinth_id=legacy-minecraft" >> $GITHUB_OUTPUT + echo "curseforge_id=re-console" >> $GITHUB_OUTPUT + fi + + build: + needs: check-tag + if: needs.check-tag.outputs.should_run == 'true' + strategy: + matrix: + include: + # modrinth fabric + - version: "1.20.1" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.20.4" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.1" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.3" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.4" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.5" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.8" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.10" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + # modrinth quilt + - version: "1.20.1" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.20.4" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.1" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.3" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.4" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.5" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.8" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.10" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + # modrinth forge + - version: "1.20.1" + loader: "forge" + platform: "modrinth" + file_ext: "mrpack" + # modrinth neoforge + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + # curseforge fabric + - version: "1.20.1" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.20.4" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.1" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.3" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.4" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.5" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.8" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.10" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + # curseforge quilt + - version: "1.20.1" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.20.4" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.1" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.3" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.4" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.5" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.8" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.10" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + # curseforge neoforge + - version: "1.21.1" + loader: "neoforge" + platform: "curseforge" + file_ext: "zip" + + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACK_NAME: ${{ needs.check-tag.outputs.pack_name }} + SOURCE_PATH: ${{ needs.check-tag.outputs.source_path }} + OUTPUT: artifacts + + outputs: + version: ${{ steps.version.outputs.version }} + commit-sha: ${{ steps.version.outputs.commit-sha }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Cache Packwiz binary to avoid Go setup and compilation + - name: Cache Packwiz Binary + uses: actions/cache@v4 + id: cache-packwiz + with: + path: ~/go/bin/packwiz + key: packwiz-binary-${{ runner.os }}-v1 + restore-keys: | + packwiz-binary-${{ runner.os }}- + + # Only set up Go and install Packwiz if not cached + - name: Set up Go + if: steps.cache-packwiz.outputs.cache-hit != 'true' + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: false + + - name: Install Packwiz + if: steps.cache-packwiz.outputs.cache-hit != 'true' + run: go install github.com/packwiz/packwiz@latest + + # Add Packwiz to PATH (whether cached or freshly installed) + - 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 + # Use the extracted version from the tag + 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: | + # Create temp directory with appropriate prefix + if [ "${{ needs.check-tag.outputs.is_lite }}" = "true" ]; then + temp_dir="RC-Lite-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp" + else + temp_dir="RC-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp" + fi + + mkdir $temp_dir + cp -r ./versions/vanilla/src/${{ env.SOURCE_PATH }}/${{ matrix.platform }}/${{ matrix.loader }}/${{ matrix.version }}/* ./$temp_dir/ + cp ./LICENSE ./$temp_dir/ + cp ./README.md ./$temp_dir/ + cd ./$temp_dir/ + packwiz refresh + mkdir -p ../$OUTPUT + packwiz ${{ matrix.platform }} export --output ../${OUTPUT}/${PACK_NAME}-${{ matrix.version }}-${{ matrix.loader }}-${{ steps.version.outputs.version }}-${{ matrix.platform }}.${{ matrix.file_ext }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }} + path: ${{ env.OUTPUT }}/* + retention-days: 1 + + publish-modrinth: + needs: [check-tag, build] + if: needs.check-tag.outputs.should_run == 'true' && needs.check-tag.outputs.is_alpha == 'false' + runs-on: ubuntu-latest + strategy: + matrix: + include: + - version: "1.20.1" + loader: "forge" + - version: "1.20.1" + loader: "quilt" + - version: "1.20.1" + loader: "fabric" + - version: "1.20.4" + loader: "quilt" + - version: "1.20.4" + loader: "fabric" + - version: "1.21.1" + loader: "neoforge" + - version: "1.21.1" + loader: "quilt" + - version: "1.21.1" + loader: "fabric" + - version: "1.21.3" + loader: "quilt" + - version: "1.21.3" + loader: "fabric" + - version: "1.21.4" + loader: "quilt" + - version: "1.21.4" + loader: "fabric" + - version: "1.21.5" + loader: "quilt" + - version: "1.21.5" + loader: "fabric" + - version: "1.21.8" + loader: "quilt" + - version: "1.21.8" + loader: "fabric" + - version: "1.21.10" + loader: "quilt" + - version: "1.21.10" + loader: "fabric" + max-parallel: 1 # Ensures sequential uploads + env: + PACK_NAME: ${{ needs.check-tag.outputs.pack_name }} + VERSION: ${{ needs.build.outputs.version }} + COMMIT_SHORT_SHA: ${{ needs.build.outputs.commit-sha }} + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: modrinth-${{ matrix.loader }}-${{ matrix.version }} + path: artifacts + + - name: Publish to Modrinth + uses: Kir-Antipov/mc-publish@v3.3 + with: + modrinth-id: ${{ needs.check-tag.outputs.modrinth_id }} + modrinth-token: ${{ secrets.MR }} + + files: | + artifacts/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.loader }}-${{ env.VERSION }}-modrinth.mrpack + + name: "${{ needs.check-tag.outputs.is_lite == 'true' && 'RC-Lite' || 'RC' }} ${{ env.VERSION }} (${{ matrix.loader == 'neoforged' && 'NeoForge' || matrix.loader == 'neoforge' && 'NeoForge' || matrix.loader == 'forge' && 'Forge' || matrix.loader == 'fabric' && 'Fabric' || matrix.loader == 'quilt' && 'Quilt' || 'ERROR, FIX ME IN publish.yml' }})" + version: "${{ env.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: ${{ matrix.loader == 'neoforged' && 'neoforge' || matrix.loader }} + game-versions: ${{ matrix.version }} + + changelog: ${{ github.event.release.body || format('Development build - {0}', env.COMMIT_SHORT_SHA) }} + + retry-attempts: 3 + retry-delay: 10000 + fail-mode: warn + + publish-curseforge: + needs: [check-tag, build] + if: needs.check-tag.outputs.should_run == 'true' && needs.check-tag.outputs.is_alpha == 'false' + runs-on: ubuntu-latest + strategy: + matrix: + include: + - version: "1.20.1" + loader: "quilt" + - version: "1.20.1" + loader: "fabric" + - version: "1.20.4" + loader: "quilt" + - version: "1.20.4" + loader: "fabric" + - version: "1.21.1" + loader: "neoforge" + - version: "1.21.1" + loader: "quilt" + - version: "1.21.1" + loader: "fabric" + - version: "1.21.3" + loader: "quilt" + - version: "1.21.3" + loader: "fabric" + - version: "1.21.4" + loader: "quilt" + - version: "1.21.4" + loader: "fabric" + - version: "1.21.5" + loader: "quilt" + - version: "1.21.5" + loader: "fabric" + - version: "1.21.8" + loader: "quilt" + - version: "1.21.8" + loader: "fabric" + max-parallel: 1 # Ensures sequential uploads + env: + PACK_NAME: ${{ needs.check-tag.outputs.pack_name }} + VERSION: ${{ needs.build.outputs.version }} + COMMIT_SHORT_SHA: ${{ needs.build.outputs.commit-sha }} + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: curseforge-${{ matrix.loader }}-${{ matrix.version }} + path: artifacts + + - name: Publish to CurseForge + uses: Kir-Antipov/mc-publish@v3.3 + with: + curseforge-id: ${{ needs.check-tag.outputs.curseforge_id }} + curseforge-token: ${{ secrets.CF }} + + files: | + artifacts/${{ env.PACK_NAME }}-${{ matrix.version }}-${{ matrix.loader }}-${{ env.VERSION }}-curseforge.zip + + name: "${{ needs.check-tag.outputs.is_lite == 'true' && 'RC-Lite' || 'RC' }} ${{ env.VERSION }} (${{ matrix.loader == 'neoforged' && 'NeoForge' || matrix.loader == 'neoforge' && 'NeoForge' || matrix.loader == 'forge' && 'Forge' || matrix.loader == 'fabric' && 'Fabric' || matrix.loader == 'quilt' && 'Quilt' || 'ERROR, FIX ME IN publish.yml' }})" + version: "${{ env.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: ${{ matrix.loader == 'neoforged' && 'neoforge' || matrix.loader }} + game-versions: ${{ matrix.version }} + + changelog: ${{ github.event.release.body || format('Development build - {0}', env.COMMIT_SHORT_SHA) }} + + retry-attempts: 3 + retry-delay: 10000 + fail-mode: warn + + publish-github: + needs: [check-tag, build] + if: needs.check-tag.outputs.should_run == 'true' && github.event_name == 'release' + runs-on: ubuntu-latest + env: + PACK_NAME: ${{ needs.check-tag.outputs.pack_name }} + VERSION: ${{ needs.build.outputs.version }} + COMMIT_SHORT_SHA: ${{ needs.build.outputs.commit-sha }} + + steps: + - name: Download all build artifacts + uses: actions/download-artifact@v4 + with: + path: all-artifacts + + - name: Create combined release package + run: | + mkdir combined-release + find all-artifacts -name "*.zip" -exec cp {} combined-release/ \; + find all-artifacts -name "*.mrpack" -exec cp {} combined-release/ \; + cd combined-release + zip_name="${{ needs.check-tag.outputs.is_lite == 'true' && 'RC-Lite' || 'RC' }}-${{ env.VERSION }}-All.zip" + zip -r "../$zip_name" . + + - name: Upload to GitHub Release + uses: Kir-Antipov/mc-publish@v3.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + files: | + ${{ needs.check-tag.outputs.is_lite == 'true' && 'RC-Lite' || 'RC' }}-${{ env.VERSION }}-All.zip + + name: "${{ needs.check-tag.outputs.is_lite == 'true' && 'RC-Lite' || 'RC' }} ${{ env.VERSION }} - All" + version: "${{ env.VERSION }}" + + 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 diff --git a/.forgejo/workflows/rc-builds.yml b/.forgejo/workflows/rc-builds.yml new file mode 100644 index 000000000..de6af6720 --- /dev/null +++ b/.forgejo/workflows/rc-builds.yml @@ -0,0 +1,247 @@ +name: RC Builds + +on: + push: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/re-console/curseforge/**' + - 'versions/vanilla/src/re-console/modrinth/**' + pull_request: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/re-console/curseforge/**' + - 'versions/vanilla/src/re-console/modrinth/**' + + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + include: + # modrinth fabric + - version: "1.20.1" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.20.4" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.1" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.3" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.4" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.5" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.8" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.10" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + # modrinth quilt + - version: "1.20.1" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.20.4" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.1" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.3" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.4" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.5" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.8" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + - version: "1.21.10" + loader: "quilt" + platform: "modrinth" + file_ext: "mrpack" + # modrinth forge + - version: "1.20.1" + loader: "forge" + platform: "modrinth" + file_ext: "mrpack" + # modrinth neoforge + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + # curseforge fabric + - version: "1.20.1" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.20.4" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.1" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.3" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.4" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.5" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.8" + loader: "fabric" + platform: "curseforge" + file_ext: "zip" + # curseforge quilt + - version: "1.20.1" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.20.4" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.1" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.3" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.4" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.5" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + - version: "1.21.8" + loader: "quilt" + platform: "curseforge" + file_ext: "zip" + # curseforge forge + - version: "1.20.1" + loader: "forge" + platform: "curseforge" + file_ext: "zip" + # curseforge neoforge + - version: "1.21.1" + loader: "neoforge" + platform: "curseforge" + file_ext: "zip" + + + runs-on: ubuntu-latest + outputs: + commit_sha: ${{ steps.vars.outputs.commit_sha }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACK_NAME: Re-Console + OUTPUT: artifacts + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Cache Packwiz binary to avoid Go setup and compilation + - name: Cache Packwiz Binary + uses: actions/cache@v4 + id: cache-packwiz + with: + path: ~/go/bin/packwiz + key: packwiz-binary-${{ runner.os }}-v1 + restore-keys: | + packwiz-binary-${{ runner.os }}- + + # Only set up Go and install Packwiz if not cached + - name: Set up Go + if: steps.cache-packwiz.outputs.cache-hit != 'true' + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: false + + - name: Install Packwiz + if: steps.cache-packwiz.outputs.cache-hit != 'true' + run: go install github.com/packwiz/packwiz@latest + + # Add Packwiz to PATH (whether cached or freshly installed) + - 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 ${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }} + run: | + mkdir RC-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp + cp -r ./versions/vanilla/src/re-console/${{ matrix.platform }}/${{ matrix.loader }}/${{ matrix.version }}/* ./RC-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp/ + cd ./RC-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp/ + packwiz refresh + mkdir -p ../$OUTPUT + packwiz ${{ matrix.platform }} export --output ../${OUTPUT}/${PACK_NAME}-${{ matrix.version }}-${{ matrix.loader }}-dev-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: "Re-Console-${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }}-dev-${{ env.COMMIT_SHORT_SHA }}" + path: artifacts + + combine: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: downloaded-artifacts + + - name: Combine artifacts + run: | + mkdir combined-artifacts + find downloaded-artifacts -name "*.mrpack" -exec cp {} combined-artifacts/ \; + find downloaded-artifacts -name "*.zip" -exec cp {} combined-artifacts/ \; + + - name: Upload combined artifacts + uses: actions/upload-artifact@v4 + with: + name: "Re-Console-dev-${{ needs.build.outputs.commit_sha }}" + path: combined-artifacts diff --git a/.forgejo/workflows/rekindled-legacy-builds.yml b/.forgejo/workflows/rekindled-legacy-builds.yml new file mode 100644 index 000000000..92699a752 --- /dev/null +++ b/.forgejo/workflows/rekindled-legacy-builds.yml @@ -0,0 +1,146 @@ +name: Rekindled Legacy Builds + +on: + push: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/rekindled-legacy/modrinth/**' + pull_request: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/rekindled-legacy/modrinth/**' + + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + include: + # modrinth + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "0033" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "0035" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "gdc" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "0054" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "tu0" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "tu1" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "tu2" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "tu3" + - version: "1.21.1" + loader: "neoforge" + platform: "modrinth" + file_ext: "mrpack" + tu: "tu5" + + runs-on: ubuntu-latest + outputs: + commit_sha: ${{ steps.vars.outputs.commit_sha }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACK_NAME: Rekindled-Legacy + OUTPUT: artifacts + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Cache Packwiz binary to avoid Go setup and compilation + - name: Cache Packwiz Binary + uses: actions/cache@v4 + id: cache-packwiz + with: + path: ~/go/bin/packwiz + key: packwiz-binary-${{ runner.os }}-v1 + restore-keys: | + packwiz-binary-${{ runner.os }}- + + # Only set up Go and install Packwiz if not cached + - name: Set up Go + if: steps.cache-packwiz.outputs.cache-hit != 'true' + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: false + + - name: Install Packwiz + if: steps.cache-packwiz.outputs.cache-hit != 'true' + run: go install github.com/packwiz/packwiz@latest + + # Add Packwiz to PATH (whether cached or freshly installed) + - 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 ${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }}-${{ matrix.tu }} + run: | + mkdir Rekindled-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-${{ matrix.tu }}-temp + cp -r ./versions/vanilla/src/rekindled-legacy/${{ matrix.platform }}/${{ matrix.loader }}/${{ matrix.version }}/${{ matrix.tu }}/* ./Rekindled-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-${{ matrix.tu }}-temp/ + cd ./Rekindled-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-${{ matrix.tu }}-temp/ + packwiz refresh + mkdir -p ../$OUTPUT + packwiz ${{ matrix.platform }} export --output ../${OUTPUT}/${PACK_NAME}-${{ matrix.version }}-${{ matrix.loader }}-dev-${{ matrix.platform }}-${{ matrix.tu }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: "Rekindled-Legacy-${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }}-${{ matrix.tu }}-dev-${{ env.COMMIT_SHORT_SHA }}" + path: artifacts + + combine: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: downloaded-artifacts + + - name: Combine artifacts + run: | + mkdir combined-artifacts + find downloaded-artifacts -name "*.mrpack" -exec cp {} combined-artifacts/ \; + find downloaded-artifacts -name "*.zip" -exec cp {} combined-artifacts/ \; + + - name: Upload combined artifacts + uses: actions/upload-artifact@v4 + with: + name: "Rekindled-Legacy-dev-${{ needs.build.outputs.commit_sha }}" + path: combined-artifacts diff --git a/.forgejo/workflows/simply-legacy-builds.yml b/.forgejo/workflows/simply-legacy-builds.yml new file mode 100644 index 000000000..d643be3c6 --- /dev/null +++ b/.forgejo/workflows/simply-legacy-builds.yml @@ -0,0 +1,105 @@ +name: Simply Legacy Builds + +on: + push: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/simply-legacy/modrinth/**' + pull_request: + branches: [ "main" ] + paths: + - 'versions/vanilla/src/simply-legacy/modrinth/**' + + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + include: + # modrinth + - version: "1.21.10" + loader: "fabric" + platform: "modrinth" + file_ext: "mrpack" + + runs-on: ubuntu-latest + outputs: + commit_sha: ${{ steps.vars.outputs.commit_sha }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACK_NAME: Simply-Legacy + OUTPUT: artifacts + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Cache Packwiz binary to avoid Go setup and compilation + - name: Cache Packwiz Binary + uses: actions/cache@v4 + id: cache-packwiz + with: + path: ~/go/bin/packwiz + key: packwiz-binary-${{ runner.os }}-v1 + restore-keys: | + packwiz-binary-${{ runner.os }}- + + # Only set up Go and install Packwiz if not cached + - name: Set up Go + if: steps.cache-packwiz.outputs.cache-hit != 'true' + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: false + + - name: Install Packwiz + if: steps.cache-packwiz.outputs.cache-hit != 'true' + run: go install github.com/packwiz/packwiz@latest + + # Add Packwiz to PATH (whether cached or freshly installed) + - 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 ${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }} + run: | + mkdir Simply-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp + cp -r ./versions/vanilla/src/simply-legacy/${{ matrix.platform }}/${{ matrix.loader }}/${{ matrix.version }}/* ./Simply-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp/ + cd ./Simply-${{ matrix.platform }}-${{ matrix.loader }}-${{ matrix.version }}-temp/ + packwiz refresh + mkdir -p ../$OUTPUT + packwiz ${{ matrix.platform }} export --output ../${OUTPUT}/${PACK_NAME}-${{ matrix.version }}-${{ matrix.loader }}-dev-${{ matrix.platform }}-${{ env.COMMIT_SHORT_SHA }}.${{ matrix.file_ext }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: "Simply-Legacy-${{ matrix.version }}-${{ matrix.loader }}-${{ matrix.platform }}-dev-${{ env.COMMIT_SHORT_SHA }}" + path: artifacts + + combine: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: downloaded-artifacts + + - name: Combine artifacts + run: | + mkdir combined-artifacts + find downloaded-artifacts -name "*.mrpack" -exec cp {} combined-artifacts/ \; + find downloaded-artifacts -name "*.zip" -exec cp {} combined-artifacts/ \; + + - name: Upload combined artifacts + uses: actions/upload-artifact@v4 + with: + name: "Simply-Legacy-dev-${{ needs.build.outputs.commit_sha }}" + path: combined-artifacts