diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 2b7a05110..c6566eacf 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -57,7 +57,7 @@ jobs: publish: needs: detect - if: always() + if: needs.detect.outputs.has_manifests == 'true' runs-on: technocality strategy: fail-fast: false @@ -74,6 +74,7 @@ jobs: datapacks src/actions/publish src/actions/builder + src/actions/somnus/core tools/changelog tools/manifest @@ -85,10 +86,6 @@ jobs: - name: Validate Manifest run: npx tsx tools/manifest/validate.ts "${{ matrix.manifest }}" - - name: Generate Changelog - id: changelog - run: npx tsx tools/changelog/generate-changelog.ts "${{ matrix.manifest }}" - - name: Cache Publisher Binary id: cache-publisher uses: actions/cache@v4 @@ -103,8 +100,15 @@ jobs: path: ./builder-bin key: builder-v2-${{ runner.os }}-${{ hashFiles('src/actions/builder/**/*.rs', 'src/actions/builder/Cargo.toml', 'src/actions/builder/Cargo.lock') }} + - name: Cache somnus_core Binaries + id: cache-somnus + uses: actions/cache@v4 + with: + path: ./linter-bin + key: somnus-core-v3-${{ runner.os }}-${{ hashFiles('src/actions/somnus/core/**/*.rs', 'src/actions/somnus/core/Cargo.toml', 'src/actions/somnus/core/Cargo.lock') }} + - name: Install Rust - if: steps.cache-publisher.outputs.cache-hit != 'true' || steps.cache-minify.outputs.cache-hit != 'true' + if: steps.cache-publisher.outputs.cache-hit != 'true' || steps.cache-minify.outputs.cache-hit != 'true' || steps.cache-somnus.outputs.cache-hit != 'true' uses: https://github.com/dtolnay/rust-toolchain@stable - name: Rust Cache (publish) @@ -119,6 +123,12 @@ jobs: with: workspaces: "src/actions/builder -> target" + - name: Rust Cache (somnus_core) + if: steps.cache-somnus.outputs.cache-hit != 'true' + uses: https://github.com/Swatinem/rust-cache@v2 + with: + workspaces: "src/actions/somnus/core -> target" + - name: Build Publisher if: steps.cache-publisher.outputs.cache-hit != 'true' run: | @@ -133,6 +143,21 @@ jobs: mkdir -p ./builder-bin cp src/actions/builder/target/release/minify-json ./builder-bin/minify-json + - name: Build mod-diff + if: steps.cache-somnus.outputs.cache-hit != 'true' + run: | + cargo build --release --manifest-path src/actions/somnus/core/Cargo.toml --bin mod-diff + mkdir -p ./linter-bin + cp src/actions/somnus/core/target/release/mod-diff ./linter-bin/mod-diff + + - name: Generate Changelog + id: changelog + env: + MOD_DIFF_BIN: ./linter-bin/mod-diff + run: | + chmod +x ./linter-bin/mod-diff + npx tsx tools/changelog/generate-changelog.ts "${{ matrix.manifest }}" + - name: Cache Packwiz Binaries id: cache-go uses: actions/cache@v4 @@ -166,10 +191,8 @@ jobs: run: | set -eu chmod +x ./builder-bin/minify-json - MANIFEST='${{ matrix.manifest }}' PACK_DIR="$(dirname "$MANIFEST")" - if [[ "$MANIFEST" == datapacks/* ]]; then TARGET="${PACK_DIR}/content" if [ -d "$TARGET" ]; then @@ -199,7 +222,6 @@ jobs: set -eu MANIFEST='${{ matrix.manifest }}' PACK_DIR="$(dirname "$MANIFEST")" - if [[ "$MANIFEST" == datapacks/* ]]; then TARGET="${PACK_DIR}/content" if [ -d "${TARGET}.original" ]; then @@ -223,13 +245,13 @@ jobs: with: modrinth-id: ${{ steps.meta.outputs.mr_id }} modrinth-token: ${{ secrets.MR }} - modrinth-files: "${{ github.workspace }}/${{ steps.meta.outputs.path }}/artifacts/*.mrpack" + modrinth-files: ${{ steps.meta.outputs.mr_id != '' && format('{0}/{1}/artifacts/*.mrpack', github.workspace, steps.meta.outputs.path) || '' }} curseforge-id: ${{ steps.meta.outputs.cf_id }} curseforge-token: ${{ secrets.CF }} - curseforge-files: "${{ github.workspace }}/${{ steps.meta.outputs.path }}/artifacts/*.zip" + curseforge-files: ${{ steps.meta.outputs.cf_id != '' && format('{0}/{1}/artifacts/*.zip', github.workspace, steps.meta.outputs.path) || '' }} name: "${{ steps.meta.outputs.name }}" version: "${{ steps.meta.outputs.ver }}" version-type: ${{ steps.meta.outputs.release_type }} changelog: "${{ steps.changelog.outputs.notes }}" loaders: ${{ steps.meta.outputs.type == 'modpack' && steps.meta.outputs.loader || 'minecraft' }} - game-versions: "${{ steps.meta.outputs.mc }}" \ No newline at end of file + game-versions: "${{ steps.meta.outputs.mc }}" diff --git a/modpacks/rc-plus/26.1.2-mr/index.toml b/modpacks/rc-plus/26.1.2-mr/index.toml index eb3c20624..a2ef7916a 100644 --- a/modpacks/rc-plus/26.1.2-mr/index.toml +++ b/modpacks/rc-plus/26.1.2-mr/index.toml @@ -1624,6 +1624,11 @@ file = "mods/minimega.pw.toml" hash = "93ab738e0025ed9d0b184f9517aed45550be49d4a6bce0e04b4adcc322dc170f" metafile = true +[[files]] +file = "mods/mod.pw.toml" +hash = "5b790b7adcf76651f0f920f7feb7f004b8699ced3d4e843cf5bba92155ee5e9e" +metafile = true + [[files]] file = "mods/moderner-beta.pw.toml" hash = "6ec7169d17308e21df34afc3b1a8a9fabcb3eb8e2068d9ea427b8bb3dbcb1350" diff --git a/modpacks/rc-plus/26.1.2-mr/mods/mod.pw.toml b/modpacks/rc-plus/26.1.2-mr/mods/mod.pw.toml new file mode 100644 index 000000000..107c8566d --- /dev/null +++ b/modpacks/rc-plus/26.1.2-mr/mods/mod.pw.toml @@ -0,0 +1,15 @@ +name = "mod" +filename = "LWS" +side = "both" + +[download] +url = "https://github.com/omo50/mod/releases/tag/lws_next-1.2" +hash-format = "sha256" +hash = "866277f4f55385f5db476560f3d6c2f91385f5c46c93655c4fb99a524cc693c5" + +[update] +[update.github] +branch = "main" +regex = "^.+(?