(Draft) Initial game mode POC #790
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 Build + Test + Publish | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -p:PostBuildEvent= | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Publish Windows 64bit | |
if: ${{ github.event_name != 'pull_request' }} | |
run: dotnet publish --os win --arch x64 -c Release src/Randomizer.App/Randomizer.App.csproj | |
- name: Publish Windows 32bit | |
if: ${{ github.event_name != 'pull_request' }} | |
run: dotnet publish --os win --arch x86 -c Release src/Randomizer.App/Randomizer.App.csproj | |
- name: Publish Linux 64bit | |
if: ${{ github.event_name != 'pull_request' }} | |
run: dotnet publish --os linux --arch x64 -c Release src/Randomizer.CrossPlatform/Randomizer.CrossPlatform.csproj | |
- name: Publish Multiplayer Server | |
if: ${{ github.event_name != 'pull_request' }} | |
run: dotnet publish -c Release src/Randomizer.Multiplayer.Server/Randomizer.Multiplayer.Server.csproj | |
- name: Get version number | |
if: ${{ github.event_name != 'pull_request' }} | |
id: version | |
run: | | |
$version = (Get-Item "src\Randomizer.App\bin\Release\net7.0-windows\win-x86\publish\Randomizer.App.exe").VersionInfo.ProductVersion | |
Write-Output "number=$version" >> $env:GITHUB_OUTPUT | |
shell: pwsh | |
- name: Building the Windows installer | |
if: ${{ github.event_name != 'pull_request' }} | |
run: "\"%programfiles(x86)%/Inno Setup 6/iscc.exe\" \"setup/randomizer.app.iss\"" | |
shell: cmd | |
- name: Building the Linux 64bit package | |
if: ${{ github.event_name != 'pull_request' }} | |
working-directory: setup | |
run: "./LinuxBuildZipper.ps1" | |
shell: pwsh | |
- name: Building the Multiplayer Server package | |
if: ${{ github.event_name != 'pull_request' }} | |
working-directory: setup | |
run: "./MultiplayerServerZipper.ps1" | |
shell: pwsh | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
path: "setup/Output/*" | |
name: SMZ3CasRandomizer_${{ steps.version.outputs.number }} |