Skip to content

13 September 2025 - Version 3.25.8.3-preview19966297 (19966297) (#362) #89

13 September 2025 - Version 3.25.8.3-preview19966297 (19966297) (#362)

13 September 2025 - Version 3.25.8.3-preview19966297 (19966297) (#362) #89

name: RocketModFix.Unturned.Redist.Matrix
on:
push:
branches: [ master ]
paths:
- 'redist/redist-*/**'
workflow_dispatch:
inputs:
variant:
description: 'Which variant to update'
required: true
type: choice
options:
- all
- client
- client-preview
- client-preview-old
- client-preview-publicized
- client-publicized
- server
- server-preview
- server-preview-old
- server-preview-publicized
- server-publicized
jobs:
build:
name: "Build ${{ matrix.variant }}"
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
include:
# Client variants
- variant: "client"
nuspec_path: "redist/redist-client/RocketModFix.Unturned.Redist.Client.nuspec"
trigger_path: "redist/redist-client/**"
- variant: "client-preview"
nuspec_path: "redist/redist-client-preview/RocketModFix.Unturned.Redist.Client.nuspec"
trigger_path: "redist/redist-client-preview/**"
- variant: "client-preview-old"
nuspec_path: "redist/redist-client-preview-old/RocketModFix.Unturned.Redist.Client.nuspec"
trigger_path: "redist/redist-client-preview-old/**"
- variant: "client-preview-publicized"
nuspec_path: "redist/redist-client-preview-publicized/RocketModFix.Unturned.Redist.Client.nuspec"
trigger_path: "redist/redist-client-preview-publicized/**"
- variant: "client-publicized"
nuspec_path: "redist/redist-client-publicized/RocketModFix.Unturned.Redist.Client.nuspec"
trigger_path: "redist/redist-client-publicized/**"
# Server variants
- variant: "server"
nuspec_path: "redist/redist-server/RocketModFix.Unturned.Redist.Server.nuspec"
trigger_path: "redist/redist-server/**"
- variant: "server-preview"
nuspec_path: "redist/redist-server-preview/RocketModFix.Unturned.Redist.Server.nuspec"
trigger_path: "redist/redist-server-preview/**"
- variant: "server-preview-old"
nuspec_path: "redist/redist-server-preview-old/RocketModFix.Unturned.Redist.Server.nuspec"
trigger_path: "redist/redist-server-preview-old/**"
- variant: "server-preview-publicized"
nuspec_path: "redist/redist-server-preview-publicized/RocketModFix.Unturned.Redist.Server.nuspec"
trigger_path: "redist/redist-server-preview-publicized/**"
- variant: "server-publicized"
nuspec_path: "redist/redist-server-publicized/RocketModFix.Unturned.Redist.Server.nuspec"
trigger_path: "redist/redist-server-publicized/**"
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
# Fetches all history for the tj-actions/changed-files to work correctly on push
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
with:
files: |
${{ matrix.trigger_path }}
- name: Determine if this variant should run
id: check
run: |
SHOULD_RUN=false
# For manual triggers, check the input
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
if [[ "${{ github.event.inputs.variant }}" == "all" || "${{ github.event.inputs.variant }}" == "${{ matrix.variant }}" ]]; then
SHOULD_RUN=true
fi
# For push triggers, use the changed-files output
elif [[ "${{ github.event_name }}" == "push" ]]; then
if [[ "${{ steps.changed-files.outputs.any_changed }}" == "true" ]]; then
SHOULD_RUN=true
fi
fi
echo "should_run=$SHOULD_RUN" >> $GITHUB_OUTPUT
- name: Setup NuGet
if: steps.check.outputs.should_run == 'true'
uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_DEPLOY_KEY }}
- name: NuGet Pack & Push
if: steps.check.outputs.should_run == 'true'
uses: ./.github/actions/nuget-pack
id: nuget-pack
with:
nuspec_path: ${{ matrix.nuspec_path }}
nuget_key: ${{ secrets.NUGET_DEPLOY_KEY }}
nuget_push: true