Revert "update with game code" #379
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: .NET | |
on: | |
push: | |
branches: [ "master", "dev", "dev2" ] | |
pull_request: | |
branches: [ "master", "dev", "dev2" ] | |
env: | |
DEPOT_DOWNLOADER_VERSION: 2.5.0 | |
SL_REFERENCES: D:\a\NwPluginAPI\SCPSL_REFERENCES\SCPSL_Data\Managed | |
UNITY_REFERENCES: D:\a\NwPluginAPI\SCPSL_REFERENCES\SCPSL_Data\Managed | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 7.0.x | |
- name: Download depot downloader | |
shell: pwsh | |
run: | | |
New-Item -ItemType Directory -Force -Path D:\a\NwPluginAPI | |
New-Item -ItemType Directory -Force -Path D:\a\NwPluginAPI\DepotDownloader | |
Invoke-WebRequest -Uri "https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_${{ env.DEPOT_DOWNLOADER_VERSION }}/depotdownloader-${{ env.DEPOT_DOWNLOADER_VERSION }}.zip" -OutFile "D:\a\NwPluginAPI\depotdownloader.zip" | |
Expand-Archive -Path D:\a\NwPluginAPI\depotdownloader.zip -PassThru -DestinationPath D:\a\NwPluginAPI/DepotDownloader | |
- name: Download SCPSL references. | |
shell: pwsh | |
run: | | |
New-Item -ItemType Directory -Force -Path D:\a\NwPluginAPI\SCPSL_REFERENCES | |
Start-Process -NoNewWindow -Wait -FilePath "D:\a\NwPluginAPI\DepotDownloader\DepotDownloader.exe" -WorkingDirectory "D:\a\NwPluginAPI\DepotDownloader" -ArgumentList '-app 996560','-dir D:\a\NwPluginAPI\SCPSL_REFERENCES','-filelist "${{ github.workspace }}\download-files.txt"' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PluginAPI | |
path: ${{ github.workspace }}/NwPluginAPI/bin/Release/net48/PluginAPI.dll |