diff --git a/.github/plugin-manifest.json b/.github/plugin-manifest.json new file mode 100644 index 0000000..6d9f6f8 --- /dev/null +++ b/.github/plugin-manifest.json @@ -0,0 +1,8 @@ +{ + "plugins": [ + { "component": "BossBars", "path": "src/BossBars", "slug": "void-bossbars" }, + { "component": "Menus", "path": "src/Menus", "slug": "void-menus" }, + { "component": "PlayerPositions", "path": "src/PlayerPositions", "slug": "void-player-positions" }, + { "component": "TabLists", "path": "src/TabLists", "slug": "void-tab-lists" } + ] +} diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d0e6eae..070793f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -9,11 +9,33 @@ on: required: true jobs: + set-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.read.outputs.matrix }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Read plugin manifest + id: read + run: | + set -euo pipefail + jq -e '.plugins | length > 0' .github/plugin-manifest.json > /dev/null + dup=$(jq -r '.plugins[].slug' .github/plugin-manifest.json | sort | uniq -d) + if [ -n "$dup" ]; then echo "::error::duplicate slug(s): $dup"; exit 1; fi + echo "matrix=$(jq -c '.plugins' .github/plugin-manifest.json)" >> "$GITHUB_OUTPUT" + build: + needs: set-matrix env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMMIT_MESSAGE: ${{ github.event_name == 'pull_request' && github.event.pull_request.title || github.event.head_commit.message }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.set-matrix.outputs.matrix) }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -22,115 +44,31 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ inputs.dotnet-version }} + cache: true + cache-dependency-path: 'src/**/*.csproj' - # region Build BossBars - - name: Build BossBars without Version - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] != 'true' }} - run: dotnet build src/BossBars --configuration Release - - - name: Build BossBars - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - run: dotnet build src/BossBars --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/BossBars--version'] }} - - - name: Publish BossBars - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - run: dotnet publish src/BossBars --output artifacts --configuration Release --no-build /p:DebugType=embedded /p:Version=${{ fromJSON(inputs.release-info)['src/BossBars--version'] }} - - - name: Rename BossBars Artifact - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.BossBars.dll artifacts/void-bossbars.dll - - - name: Upload a BossBars Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-bossbars.dll - path: artifacts/void-bossbars.dll - compression-level: 9 - if-no-files-found: error - # endregion Build BossBars - - # region Build Menus - - name: Build Menus without Version - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] != 'true' }} - run: dotnet build src/Menus --configuration Release - - - name: Build Menus - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - run: dotnet build src/Menus --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/Menus--version'] }} - - - name: Publish Menus - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - run: dotnet publish src/Menus --output artifacts --configuration Release --no-build /p:DebugType=embedded /p:Version=${{ fromJSON(inputs.release-info)['src/Menus--version'] }} - - - name: Rename Menus Artifact - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.Menus.dll artifacts/void-menus.dll - - - name: Upload a Menus Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-menus.dll - path: artifacts/void-menus.dll - compression-level: 9 - if-no-files-found: error - # endregion Build Menus - - # region Build PlayerPositions - - name: Build PlayerPositions without Version - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] != 'true' }} - run: dotnet build src/PlayerPositions --configuration Release - - - name: Build PlayerPositions - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - run: dotnet build src/PlayerPositions --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/PlayerPositions--version'] }} - - - name: Publish PlayerPositions - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - run: dotnet publish src/PlayerPositions --output artifacts --configuration Release --no-build /p:DebugType=embedded /p:Version=${{ fromJSON(inputs.release-info)['src/PlayerPositions--version'] }} - - - name: Rename PlayerPositions Artifact - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.PlayerPositions.dll artifacts/void-player-positions.dll - - - name: Upload a PlayerPositions Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-player-positions.dll - path: artifacts/void-player-positions.dll - compression-level: 9 - if-no-files-found: error - # endregion Build PlayerPositions - - # region Build TabLists - - name: Build TabLists without Version - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] != 'true' }} - run: dotnet build src/TabLists --configuration Release + - name: Build ${{ matrix.component }} without Version + if: ${{ fromJSON(inputs.release-info).releases_created != 'true' && fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] != 'true' }} + run: dotnet build ${{ matrix.path }} --configuration Release - - name: Build TabLists - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} - run: dotnet build src/TabLists --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/TabLists--version'] }} + - name: Build ${{ matrix.component }} + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} + run: dotnet build ${{ matrix.path }} --configuration Release /p:Version=${{ fromJSON(inputs.release-info)[format('{0}--version', matrix.path)] }} - - name: Publish TabLists - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} - run: dotnet publish src/TabLists --output artifacts --configuration Release --no-build /p:DebugType=embedded /p:Version=${{ fromJSON(inputs.release-info)['src/TabLists--version'] }} + - name: Publish ${{ matrix.component }} + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} + run: dotnet publish ${{ matrix.path }} --output artifacts --configuration Release --no-build /p:DebugType=embedded /p:Version=${{ fromJSON(inputs.release-info)[format('{0}--version', matrix.path)] }} - - name: Rename TabLists Artifact - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} + - name: Rename ${{ matrix.component }} Artifact + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} shell: bash - run: mv artifacts/Void.Plugins.TabLists.dll artifacts/void-tab-lists.dll + run: mv artifacts/Void.Plugins.${{ matrix.component }}.dll artifacts/${{ matrix.slug }}.dll - - name: Upload a TabLists Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} + - name: Upload ${{ matrix.component }} Build Artifact + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} uses: actions/upload-artifact@v4 with: - name: void-tab-lists.dll - path: artifacts/void-tab-lists.dll + name: ${{ matrix.slug }}.dll + path: artifacts/${{ matrix.slug }}.dll compression-level: 9 if-no-files-found: error - # endregion Build TabLists diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index a7d699c..5c89344 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -19,30 +19,96 @@ jobs: path: artifacts merge-multiple: true - - name: Upload BossBars Release Artifacts - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} + - name: Resolve prior plugin DLLs env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_INFO: ${{ inputs.release-info }} + shell: bash run: | - gh release upload ${{ fromJSON(inputs.release-info)['src/BossBars--tag_name'] }} artifacts/void-bossbars.dll + set -euo pipefail + mkdir -p artifacts - - name: Upload Menus Release Artifacts - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload ${{ fromJSON(inputs.release-info)['src/Menus--tag_name'] }} artifacts/void-menus.dll + declare -A SKIPPED - - name: Upload PlayerPositions Release Artifacts - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload ${{ fromJSON(inputs.release-info)['src/PlayerPositions--tag_name'] }} artifacts/void-player-positions.dll + mapfile -t plugins < <(jq -r '.plugins[] | "\(.component)|\(.slug).dll|\(.path)--release_created"' .github/plugin-manifest.json) + + for entry in "${plugins[@]}"; do + IFS='|' read -r component dll key <<< "$entry" + released=$(echo "$RELEASE_INFO" | jq -r --arg k "$key" '.[$k] // "false"') + + if [ "$released" = "true" ]; then + echo "::notice::$component released this run — using freshly built $dll" + continue + fi + + if [ -f "artifacts/$dll" ]; then + echo "::notice::Trusting pre-existing $dll in artifacts/" + continue + fi + + releases_json=$(gh release list --limit 200 --json tagName,createdAt 2>&1) || { + echo "::error::gh release list failed for $component: $releases_json" + exit 1 + } + latest_tag=$(echo "$releases_json" | jq -r \ + --arg c "$component" \ + '[.[] | select(.tagName | test("^" + $c + "-v[0-9]+\\.[0-9]+\\.[0-9]+$"))] | sort_by(.createdAt) | reverse | .[0].tagName' \ + 2>/dev/null || echo "null") + + if [ -z "$latest_tag" ] || [ "$latest_tag" = "null" ]; then + echo "::warning::No stable prior release found for $component — $dll will be omitted" + SKIPPED[$dll]=1 + continue + fi + + echo "::notice::Fetching $dll from $latest_tag" + if ! gh release download "$latest_tag" --pattern "$dll" --dir artifacts --clobber 2>&1; then + echo "::warning::Failed to download $dll from $latest_tag — skipping" + SKIPPED[$dll]=1 + fi + done + + echo "=== Bundle manifest ===" + shopt -s nullglob + for f in artifacts/void-*.dll; do echo " $f"; done + shopt -u nullglob + + missing=() + mapfile -t expected_dlls < <(jq -r '.plugins[] | "\(.slug).dll"' .github/plugin-manifest.json) + for dll in "${expected_dlls[@]}"; do + if [ -z "${SKIPPED[$dll]+x}" ] && [ ! -f "artifacts/$dll" ]; then + missing+=("$dll") + fi + done + if [ ${#missing[@]} -gt 0 ]; then + echo "::error::Expected DLLs missing from artifacts: ${missing[*]}" + exit 1 + fi - - name: Upload TabLists Release Artifacts - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} + - name: Upload Release bundles env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_INFO: ${{ inputs.release-info }} + shell: bash run: | - gh release upload ${{ fromJSON(inputs.release-info)['src/TabLists--tag_name'] }} artifacts/void-tab-lists.dll + set -euo pipefail + shopt -s nullglob + files=(artifacts/void-*.dll) + if [ ${#files[@]} -eq 0 ]; then + echo "::error::No DLLs found in artifacts/ for bundle upload" + exit 1 + fi + while IFS='|' read -r component path slug; do + released=$(jq -r --arg k "${path}--release_created" '.[$k] // "false"' <<<"$RELEASE_INFO") + if [ "$released" != "true" ]; then + echo "::notice::Skipping $component bundle upload (release_created != true)" + continue + fi + tag=$(jq -r --arg k "${path}--tag_name" '.[$k]' <<<"$RELEASE_INFO") + if [ -z "$tag" ] || [ "$tag" = "null" ]; then + echo "::error::Missing tag_name for $component (path=$path)" + exit 1 + fi + echo "Uploading ${#files[@]} DLL(s) to $tag ($component)" + gh release upload "$tag" "${files[@]}" --clobber + done < <(jq -r '.plugins[] | "\(.component)|\(.path)|\(.slug)"' .github/plugin-manifest.json) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index d7fa425..2842407 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -9,11 +9,33 @@ on: required: true jobs: + set-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.read.outputs.matrix }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Read plugin manifest + id: read + run: | + set -euo pipefail + jq -e '.plugins | length > 0' .github/plugin-manifest.json > /dev/null + dup=$(jq -r '.plugins[].slug' .github/plugin-manifest.json | sort | uniq -d) + if [ -n "$dup" ]; then echo "::error::duplicate slug(s): $dup"; exit 1; fi + echo "matrix=$(jq -c '.plugins' .github/plugin-manifest.json)" >> "$GITHUB_OUTPUT" + push: + needs: set-matrix env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: ${{ fromJSON(inputs.release-info).releases_created == 'true' }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.set-matrix.outputs.matrix) }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -22,115 +44,31 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ inputs.dotnet-version }} + cache: true + cache-dependency-path: 'src/**/*.csproj' - # region Build BossBars - - name: Build BossBars - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - run: dotnet build src/BossBars --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/BossBars--version'] }} - - - name: Pack BossBars - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - run: dotnet pack src/BossBars --configuration Release --output artifacts /p:Version=${{ fromJSON(inputs.release-info)['src/BossBars--version'] }} - - - name: Rename BossBars Artifacts - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.BossBars.${{ fromJSON(inputs.release-info)['src/BossBars--version'] }}.nupkg artifacts/void-bossbars.nupkg - - - name: NuGet Push BossBars - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - run: dotnet nuget push artifacts/void-bossbars.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} - - - name: Upload a BossBars Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/BossBars--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-bossbars.nupkg - path: artifacts/void-bossbars.nupkg - compression-level: 9 - if-no-files-found: error - # endregion Build BossBars - - # region Build Menus - - name: Build Menus - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - run: dotnet build src/Menus --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/Menus--version'] }} - - - name: Pack Menus - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - run: dotnet pack src/Menus --configuration Release --output artifacts /p:Version=${{ fromJSON(inputs.release-info)['src/Menus--version'] }} - - - name: Rename Menus Artifacts - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.Menus.${{ fromJSON(inputs.release-info)['src/Menus--version'] }}.nupkg artifacts/void-menus.nupkg - - - name: NuGet Push Menus - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - run: dotnet nuget push artifacts/void-menus.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} - - - name: Upload a Menus Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/Menus--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-menus.nupkg - path: artifacts/void-menus.nupkg - compression-level: 9 - if-no-files-found: error - # endregion Build Menus - - # region Build PlayerPositions - - name: Build PlayerPositions - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - run: dotnet build src/PlayerPositions --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/PlayerPositions--version'] }} - - - name: Pack PlayerPositions - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - run: dotnet pack src/PlayerPositions --configuration Release --output artifacts /p:Version=${{ fromJSON(inputs.release-info)['src/PlayerPositions--version'] }} - - - name: Rename PlayerPositions Artifacts - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - shell: bash - run: mv artifacts/Void.Plugins.PlayerPositions.${{ fromJSON(inputs.release-info)['src/PlayerPositions--version'] }}.nupkg artifacts/void-player-positions.nupkg - - - name: NuGet Push PlayerPositions - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - run: dotnet nuget push artifacts/void-player-positions.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} - - - name: Upload a PlayerPositions Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/PlayerPositions--release_created'] == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: void-player-positions.nupkg - path: artifacts/void-player-positions.nupkg - compression-level: 9 - if-no-files-found: error - # endregion Build PlayerPositions - - # region Build TabLists - - name: Build TabLists - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} - run: dotnet build src/TabLists --configuration Release /p:Version=${{ fromJSON(inputs.release-info)['src/TabLists--version'] }} + - name: Build ${{ matrix.component }} + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} + run: dotnet build ${{ matrix.path }} --configuration Release /p:Version=${{ fromJSON(inputs.release-info)[format('{0}--version', matrix.path)] }} - - name: Pack TabLists - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} - run: dotnet pack src/TabLists --configuration Release --output artifacts /p:Version=${{ fromJSON(inputs.release-info)['src/TabLists--version'] }} + - name: Pack ${{ matrix.component }} + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} + run: dotnet pack ${{ matrix.path }} --configuration Release --output artifacts /p:Version=${{ fromJSON(inputs.release-info)[format('{0}--version', matrix.path)] }} - - name: Rename TabLists Artifacts - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} + - name: Rename ${{ matrix.component }} Artifacts + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} shell: bash - run: mv artifacts/Void.Plugins.TabLists.${{ fromJSON(inputs.release-info)['src/TabLists--version'] }}.nupkg artifacts/void-tab-lists.nupkg + run: mv artifacts/Void.Plugins.${{ matrix.component }}.${{ fromJSON(inputs.release-info)[format('{0}--version', matrix.path)] }}.nupkg artifacts/${{ matrix.slug }}.nupkg - - name: NuGet Push TabLists - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} - run: dotnet nuget push artifacts/void-tab-lists.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} + - name: NuGet Push ${{ matrix.component }} + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} + run: dotnet nuget push artifacts/${{ matrix.slug }}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} - - name: Upload a TabLists Build Artifact - if: ${{ fromJSON(inputs.release-info)['src/TabLists--release_created'] == 'true' }} + - name: Upload ${{ matrix.component }} Build Artifact + if: ${{ fromJSON(inputs.release-info)[format('{0}--release_created', matrix.path)] == 'true' }} uses: actions/upload-artifact@v4 with: - name: void-tab-lists.nupkg - path: artifacts/void-tab-lists.nupkg + name: ${{ matrix.slug }}.nupkg + path: artifacts/${{ matrix.slug }}.nupkg compression-level: 9 if-no-files-found: error - # endregion Build TabLists diff --git a/.github/workflows/validate-plugin-lists.yml b/.github/workflows/validate-plugin-lists.yml new file mode 100644 index 0000000..494f352 --- /dev/null +++ b/.github/workflows/validate-plugin-lists.yml @@ -0,0 +1,27 @@ +name: "Validate Plugin Lists" + +on: + pull_request: + paths: + - '.github/plugin-manifest.json' + - '.github/RELEASE_PLEASE/config.json' + - '.github/RELEASE_PLEASE/manifest.json' + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check plugin list consistency + run: | + set -euo pipefail + manifest_paths=$(jq -r '.plugins[].path' .github/plugin-manifest.json | sort) + rp_config_paths=$(jq -r '.packages | keys[]' .github/RELEASE_PLEASE/config.json | sort) + rp_manifest_paths=$(jq -r 'keys[]' .github/RELEASE_PLEASE/manifest.json | sort) + diff <(echo "$manifest_paths") <(echo "$rp_config_paths") \ + || { echo "::error::plugin-manifest.json vs RELEASE_PLEASE/config.json drift"; exit 1; } + diff <(echo "$manifest_paths") <(echo "$rp_manifest_paths") \ + || { echo "::error::plugin-manifest.json vs RELEASE_PLEASE/manifest.json drift"; exit 1; } + echo "Plugin lists are consistent." diff --git a/.gitignore b/.gitignore index bc78471..714cd8c 100644 --- a/.gitignore +++ b/.gitignore @@ -482,3 +482,5 @@ $RECYCLE.BIN/ # Vim temporary swap files *.swp + +.omc