Build SPT Projects #371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build SPT Projects | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- '**.ps1' | |
- '**.yml' | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
job1: | |
name: Build SPT Server | |
strategy: | |
fail-fast: false | |
matrix: | |
m: | |
[ | |
# { | |
# branch: "3.10.5-DEV", | |
# node: 20 | |
# }, | |
{ | |
branch: "4.0.0-DEV", | |
node: 22 | |
} | |
] | |
os: | |
[ | |
{ | |
os: "windows-latest", | |
flags: "-NoZip", | |
zip: false | |
}, | |
{ | |
os: "ubuntu-latest", | |
flags: "", | |
zip: true | |
} | |
] | |
dbg: ["", "-Release"] | |
runs-on: ${{matrix.os.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{matrix.m.node}} | |
- name: Build SPT Server | |
id: build | |
shell: pwsh | |
run: ./build_server.ps1 -Overwrite -Branch ${{matrix.m.branch}} ${{matrix.dbg}} ${{matrix.os.flags}} | |
- uses: actions/upload-artifact@v4 | |
if: ${{! matrix.os.zip}} | |
with: | |
name: ${{ steps.build.outputs.ZIP_NAME }} | |
path: './Server/project/build/*' | |
if-no-files-found: error | |
retention-days: 3 | |
compression-level: 9 | |
- uses: actions/upload-artifact@v4 | |
if: ${{matrix.os.zip}} | |
with: | |
name: ${{ steps.build.outputs.ZIP_NAME }} | |
path: './Server/${{ steps.build.outputs.ZIP_NAME }}' | |
if-no-files-found: error | |
retention-days: 3 | |
compression-level: 0 | |
job2: | |
name: Build Windows SPT Packages | |
strategy: | |
fail-fast: false | |
matrix: | |
versions: | |
[ | |
# { | |
# sbranch: "3.10.5-DEV", | |
# lbranch: "3.10.5-DEV", | |
# mbranch: "3.10.5-DEV", | |
# version: "0.15.5.1.33420", | |
# node: 20 | |
# }, | |
{ | |
sbranch: "4.0.0-DEV", | |
lbranch: "4.0.0-DEV", | |
mbranch: "4.0.0-DEV", | |
version: "0.16.0.2.34510", | |
node: 22 | |
} | |
] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.versions.node }} | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8 | |
- name: Build SPT Server | |
id: build_server | |
shell: pwsh | |
run: ./build_server.ps1 -Overwrite -NoZip -Branch ${{ matrix.versions.sbranch }} -Release | |
- name: Build SPT Modules | |
id: build_modules | |
shell: pwsh | |
run: ./build_modules.ps1 -Overwrite -NoZip -Branch ${{ matrix.versions.mbranch }} -Url ${{ secrets.DLL_URL }} -TarkovVersion ${{ matrix.versions.version }} | |
- name: Build SPT Launcher | |
id: build_launcher | |
shell: pwsh | |
run: ./build_launcher.ps1 -Overwrite -Branch ${{ matrix.versions.lbranch }} | |
- name: Make Final Package | |
id: build_package | |
shell: pwsh | |
run: .\build_full_package.ps1 -Overwrite -PkgOnly -NoZip | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.build_modules.outputs.ZIP_NAME }} | |
path: './Modules/project/Build/*' | |
if-no-files-found: error | |
retention-days: 3 | |
compression-level: 9 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.build_package.outputs.ZIP_NAME }} | |
path: "./output/*" | |
if-no-files-found: error | |
retention-days: 3 | |
compression-level: 9 |