Skip to content

feat(IW3 MP): add cj_tas module #102

feat(IW3 MP): add cj_tas module

feat(IW3 MP): add cj_tas module #102

Workflow file for this run

name: Build and Release
on:
pull_request:
types: [opened, reopened, synchronize, closed]
branches:
- main
workflow_dispatch:
inputs:
prerelease:
description: "Is this a pre-release?"
required: true
type: boolean
default: false
# Add permissions needed for creating releases
permissions:
contents: write
pull-requests: write
jobs:
install:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for proper commit counting
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install gdown
run: pip install gdown
- name: Download Visual Studio 2010 Ultimate
env:
FILE_ID: ${{ secrets.GDRIVE_VS2010_ULTIMATE_ISO_FILE_ID }}
run: |
gdown "https://drive.google.com/uc?id=$env:FILE_ID" --output vs2010_ultimate.iso
shell: pwsh
- name: Mount ISO and Install Visual Studio 2010 Ultimate
run: |
# Mount the ISO
$mountResult = Mount-DiskImage -ImagePath "$env:GITHUB_WORKSPACE\vs2010_ultimate.iso" -PassThru
$driveLetter = ($mountResult | Get-Volume).DriveLetter
# Install VCExpress
Write-Host "Installing VCExpress from ${driveLetter}:\Setup\setup.exe"
$process = Start-Process -FilePath "${driveLetter}:\Setup\setup.exe" -ArgumentList "/q /norestart" -Wait -PassThru
# Check installation result
if ($process.ExitCode -eq 3010) {
Write-Host "Installation completed but requires a reboot. Continuing without reboot."
} elseif ($process.ExitCode -ne 0) {
Write-Host "Installation failed with exit code: $($process.ExitCode)"
exit $process.ExitCode
}
# Unmount the ISO
Dismount-DiskImage -ImagePath "$env:GITHUB_WORKSPACE\vs2010_ultimate.iso"
shell: pwsh
- name: Download Xbox 360 SDK
env:
FILE_ID: ${{ secrets.GDRIVE_XBOX360_SDK_FILE_ID }}
run: |
gdown "https://drive.google.com/uc?id=$env:FILE_ID" --output xbox360_sdk.exe
shell: pwsh
- name: Install Xbox 360 SDK
run: |
Start-Process -FilePath "xbox360_sdk.exe" -ArgumentList "/U", "/T full" -Wait
- name: Build Plugin
id: build
run: |
# Get commit count
$commitCount = git rev-list --count HEAD
echo "BUILD_NUMBER=$commitCount" >> $env:GITHUB_OUTPUT
# Build using build.py which will use the same commit count
python build.py
echo "ZIP_FILE=iw3xe-r${commitCount}.zip" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Create Release
if: github.event_name == 'workflow_dispatch'
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: r${{ steps.build.outputs.BUILD_NUMBER }}
name: r${{ steps.build.outputs.BUILD_NUMBER }}
draft: false
prerelease: ${{ github.event.inputs.prerelease }}
generate_release_notes: true
files: |
build/${{ steps.build.outputs.ZIP_FILE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}