@@ -206,6 +206,10 @@ jobs:
206206 flags="$flags --preview"
207207 ;;
208208 esac
209+
210+ if [[ "${{ matrix.variant }}" == client-publicized || "${{ matrix.variant }}" == server-publicized || "${{ matrix.variant }}" == client-preview-publicized || "${{ matrix.variant }}" == server-preview-publicized ]]; then
211+ flags="$flags -publicize [Assembly-CSharp.dll]"
212+ fi
209213
210214 echo "Event name: ${{ github.event_name }}"
211215 echo "Matrix variant: ${{ matrix.variant }}"
@@ -239,47 +243,6 @@ jobs:
239243 echo "Changes detected after all processing for ${{ matrix.variant }}"
240244 fi
241245
242- - name : Install BepInEx Assembly Publicizer
243- if : contains(matrix.variant, 'publicized')
244- run : |
245- dotnet tool install -g BepInEx.AssemblyPublicizer.Cli
246- echo "BepInEx Assembly Publicizer installed"
247-
248- - name : Publicize Assembly-CSharp.dll
249- if : contains(matrix.variant, 'publicized')
250- run : |
251- echo "Publicizing Assembly-CSharp.dll for ${{ matrix.variant }}"
252-
253- # Find Assembly-CSharp.dll in the redist directory
254- ASSEMBLY_PATH="$GITHUB_WORKSPACE/$REDIST_DIR/Assembly-CSharp.dll"
255-
256- if [ -f "$ASSEMBLY_PATH" ]; then
257- echo "Found Assembly-CSharp.dll at: $ASSEMBLY_PATH"
258-
259- # Create backup
260- cp "$ASSEMBLY_PATH" "$ASSEMBLY_PATH.backup"
261- echo "Created backup at: $ASSEMBLY_PATH.backup"
262-
263- # Publicize the assembly
264- echo "Running assembly-publicizer..."
265- if assembly-publicizer "$ASSEMBLY_PATH" --overwrite; then
266- echo "Successfully publicized Assembly-CSharp.dll"
267- # Remove backup if successful
268- rm "$ASSEMBLY_PATH.backup"
269- echo "Removed backup file"
270- else
271- echo "Failed to publicize Assembly-CSharp.dll"
272- echo "Restoring original file from backup..."
273- mv "$ASSEMBLY_PATH.backup" "$ASSEMBLY_PATH"
274- echo "Original file restored. Workflow will fail."
275- exit 1
276- fi
277- else
278- echo "Error: Assembly-CSharp.dll not found at $ASSEMBLY_PATH"
279- echo "This is required for publicized variants. Workflow will fail."
280- exit 1
281- fi
282-
283246 - name : Create Pull Request
284247 id : create_pr
285248 uses : peter-evans/create-pull-request@v7
0 commit comments