Skip to content

CI try #7

CI try #7 #11

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
# Add game versions here
version: [GOWE69]
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# Set Git config
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Copy the original files to the workspace
# TODO this only supports GOWE69
- name: Prepare
shell: pwsh
env:
BUILD_REPO_TAG: "v1.0"
BUILD_REPO_AUTHOR: dbalatoni13
BUILD_REPO_NAME: nfs-gc-build
run: |
curl -L -H "Authorization: Bearer ${{ secrets.ORIG_FILES_TOKEN }}" `
-H "Accept: application/octet-stream" `
"https://api.github.com/repos/${env:BUILD_REPO_AUTHOR}/${env:BUILD_REPO_NAME}/zipball/${env:BUILD_REPO_TAG}" `
--output orig.zip
Expand-Archive -Path orig.zip -DestinationPath .
$folders = Get-ChildItem -Directory | Where-Object { $_.Name -like "${env:BUILD_REPO_AUTHOR}-${env:BUILD_REPO_NAME}*"" }
$folderName = $folders[0].Name
$path = Join-Path $folderName "orig/${{ matrix.version }}"
Copy-Item -Path $path -Destination "orig/${{ matrix.version }}" -Recurse
# Build the project
- name: Build
run: |
python configure.py --map --version ${{ matrix.version }}
ninja all_source progress build/${{ matrix.version }}/report.json
# Upload map files
- name: Upload map
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_maps
path: build/${{ matrix.version }}/**/*.MAP
# Upload progress report
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_report
path: build/${{ matrix.version }}/report.json