Skip to content

Build Engine DLLs

Build Engine DLLs #91

Workflow file for this run

name: Build Engine DLLs
on:
workflow_dispatch:
inputs:
IsBeta:
description: 'Set to true for a beta release'
required: true
default: true
type: boolean
jobs:
build:
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout FRB
uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'FlatRedBall'
submodules: recursive
- name: Checkout Gum
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/Gum
fetch-depth: 1
path: 'Gum'
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: Build BuildServerUploader
run: dotnet build -c Debug 'FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploader.sln'
- name: Change version numbers for beta release
if: ${{ github.event.inputs.IsBeta == 'true' }}
run: .\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe changeengineversion beta
- name: Change version numbers for non-beta release
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: .\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe changeengineversion
## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall Web Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web.sln'
- name: Package FlatRedBall Web
uses: actions/upload-artifact@v3
with:
name: WebKniNet8Debug
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Debug\net8.0\
- name: Publish NuGet package Web .NET 8
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\KniWeb\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall Web Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall Web
uses: actions/upload-artifact@v3
with:
name: WebKniNet8Release
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Release\net8.0-ios\
## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall iOS .NET 8 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOS.Net8.sln'
- name: Package FlatRedBall iOS .NET 8
uses: actions/upload-artifact@v3
with:
name: iOSMonoGameNet8Debug
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOSMonoGame\bin\Debug\net8.0-ios\
- name: Publish NuGet package iOS .NET 8
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\FlatRedBalliOS\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall iOS .NET 8 Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOS.Net8.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall iOS .NET 8
uses: actions/upload-artifact@v3
with:
name: iOSMonoGameNet8Release
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOSMonoGame\bin\Release\net8.0-ios\
## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall Android .NET 8 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Android.Net8.sln'
- name: Package FlatRedBall Android .NET 8
uses: actions/upload-artifact@v3
with:
name: AndroidMonoGameNet8Debug
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.AndroidMonoGame\bin\Debug\net8.0-android\
- name: Publish NuGet package Android .NET 8
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\FlatRedBallAndroid\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall Android .NET 8 Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Android.Net8.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall Android .NET 8
uses: actions/upload-artifact@v3
with:
name: AndroidMonoGameNet8Release
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.AndroidMonoGame\bin\Release\net8.0-android\
## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall FNA .NET 7 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.FNA.sln'
- name: Package FlatRedBall FNA .NET 7
uses: actions/upload-artifact@v3
with:
name: DesktopGlFnaNet7Debug
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.FNA/bin/Debug/net7.0/
- name: Publish NuGet package FRB FNA .NET 7
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall.FNA\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall FNA .NET 7 Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.FNA.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall FNA .NET 7
uses: actions/upload-artifact@v3
with:
name: DesktopGlFnaNet7Release
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.FNA/bin/Release/net7.0/
## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall DesktopGL .NET 6 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGLNet6.sln'
- name: Package FlatRedBall .NET 6
uses: actions/upload-artifact@v3
with:
name: DesktopGlNet6Debug
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.DesktopGlNet6/bin/Debug/net6.0/
- name: Publish NuGet package DesktopGL .NET 6
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\FlatRedBallDesktopGLNet6\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall DesktopGL .NET 6 Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGLNet6.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall .NET 6
uses: actions/upload-artifact@v3
with:
name: DesktopGlNet6Release
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.DesktopGlNet6/bin/Release/net6.0/
## ## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall .NET 4 Debug
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGL.sln'
- name: Package FlatRedBall .NET 4
if: ${{ github.event.inputs.IsBeta == 'false' }}
uses: actions/upload-artifact@v3
with:
name: DesktopGlNet4Debug
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms/bin/DesktopGL/Debug/
## Net4 doesn't (and maybe never will) nuget publish. We still have this as of April 25,2024 for historical reasons but this will get retired in the future
- name: Build FlatRedBall .NET 4 Release
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGL.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall .NET 4
if: ${{ github.event.inputs.IsBeta == 'false' }}
uses: actions/upload-artifact@v3
with:
name: DesktopGlNet4Release
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms/bin/DesktopGL/Release/
# - name: Directory listing
# run: |
# Get-ChildItem -Path . -Recurse -ErrorAction SilentlyContinue -Force
# - name: Check if directory exists
# run: |
# $FolderPath = '.\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe'
# if (Test-Path -Path $FolderPath) {
# Write-Host "Directory exists at $FolderPath"
# } else {
# Write-Host "Directory does not exist at $FolderPath"
# }
- name: Copy dlls to templates
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: .\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe copytotemplates
- name: Zip and upload templates
if: ${{ github.event.inputs.IsBeta == 'false' }}
env: # Or as an environment variable
username: ${{ secrets.FTPUSERNAME }}
password: ${{ secrets.FTPPASSWORD }}
run: .\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe zipanduploadtemplates "${{ env.username }}" "${{ env.password }}"
# $FolderPath2 = 'FlatRedBall\Engines\Forms\FlatRedBall.Forms'
# if (Test-Path -Path $FolderPath2) {
# Write-Host "Directory exists at $FolderPath2"
# } else {
# Write-Host "Directory does not exist at $FolderPath2"
# }
# $currentDirectory = $PWD.Path
# Write-Host "Current directory: $currentDirectory"
# if (Test-Path -Path $env:GITHUB_WORKSPACE) {
# Write-Host "Current directory exists - wouldnt you know it?"
# }
# $path1 = "$($env:GITHUB_WORKSPACE)\FlatRedBall"
# Write-Host "Testing $path1"
# if (Test-Path -Path $path1) {
# Write-Host "2it exists"
# }
# if (Test-Path -Path "$($env:GITHUB_WORKSPACE)\FlatRedBall\FlatRedBall.Forms") {
# Write-Host "3 exists"
# }
# shell: pwsh
# - name: Directory listing
# run: |
# Get-ChildItem -Path . -Recurse -ErrorAction SilentlyContinue -Force