mirror of
https://github.com/Nostalgica-Reverie/Content-Monorepo.git
synced 2026-05-09 00:24:15 +00:00
Fix
This commit is contained in:
@@ -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 }}"
|
||||
game-versions: "${{ steps.meta.outputs.mc }}"
|
||||
|
||||
Reference in New Issue
Block a user