Add release publish scripts

This commit is contained in:
Matt Nadareski
2023-09-26 17:13:15 -04:00
parent abf4eb9b7c
commit f02904ea49
4 changed files with 197 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
- Disable subdump download in AppVeyor
- Normalize publish scripts
- Update AppVeyor to match scripts
- Add release publish scripts
### 2.6.4 (2023-09-25)

View File

@@ -19,8 +19,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\ISSUE_TEMPLATE\informational.md = .github\ISSUE_TEMPLATE\informational.md
.github\ISSUE_TEMPLATE\issue-report.md = .github\ISSUE_TEMPLATE\issue-report.md
publish-nix.sh = publish-nix.sh
README.md = README.md
publish-release-nix.sh = publish-release-nix.sh
publish-release-win.bat = publish-release-win.bat
publish-win.bat = publish-win.bat
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MPF.Core", "MPF.Core\MPF.Core.csproj", "{70B1265D-FE49-472A-A83D-0B462152D37A}"

92
publish-release-nix.sh Executable file
View File

@@ -0,0 +1,92 @@
#! /bin/bash
# This batch file assumes the following:
# - .NET 7.0 (or newer) SDK is installed and in PATH
# - zip is installed and in PATH
# - The relevant commandline programs are already downloaded
# and put into their respective folders
#
# If any of these are not satisfied, the operation may fail
# in an unpredictable way and result in an incomplete output.
# TODO: Re-enable MPF building after figuring out how to build Windows desktop applications on Linux
# This may require an additional package to be installed?
# Set the current directory as a variable
BUILD_FOLDER=$PWD
# Restore Nuget packages for all builds
echo "Restoring Nuget packages"
dotnet restore
# .NET 6.0
echo "Building .NET 6.0 releases"
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
# .NET 7.0
echo "Building .NET 6.0 releases"
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
# Create MPF archives
#cd $BUILD_FOLDER/MPF/bin/Release/net6.0-windows/win7-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win7-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net6.0-windows/win8-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win8-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net6.0-windows/win81-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win81-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net6.0-windows/win10-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win10-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net7.0-windows/win7-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net7.0_win7-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net7.0-windows/win8-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net7.0_win8-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net7.0-windows/win81-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net7.0_win81-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Release/net7.0-windows/win10-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net7.0_win10-x64.zip .
# Create MPF.Check archives
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/win7-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win7-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/win8-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win8-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/win81-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win81-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/win10-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win10-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/linux-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_linux-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/osx-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_osx-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/win7-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_win7-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/win8-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_win8-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/win81-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_win81-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/win10-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_win10-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/linux-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_linux-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/osx-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net7.0_osx-x64.zip .

101
publish-release-win.bat Normal file
View File

@@ -0,0 +1,101 @@
@echo OFF
REM This batch file assumes the following:
REM - .NET Framework 4.8 SDK is installed and in PATH
REM - .NET 7.0 (or newer) SDK is installed and in PATH
REM - 7-zip commandline (7z.exe) is installed and in PATH
REM - The relevant commandline programs are already downloaded
REM and put into their respective folders
REM
REM If any of these are not satisfied, the operation may fail
REM in an unpredictable way and result in an incomplete output.
REM Set the current directory as a variable
set BUILD_FOLDER=%~dp0
REM Restore Nuget packages for all builds
echo Restoring Nuget packages
dotnet restore
REM .NET Framework 4.8
echo Building .NET Framework 4.8 releases
msbuild MPF\MPF.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
msbuild MPF.Check\MPF.Check.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
REM .NET 6.0 Debug
echo Building .NET 6.0 debug releases
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
REM .NET 7.0 Debug
echo Building .NET 7.0 debug releases
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win7-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win8-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win81-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win10-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
REM Create MPF Debug archives
cd %BUILD_FOLDER%\MPF\bin\Release\net48\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net48.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win10-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net7.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net7.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net7.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net7.0_win10-x64.zip *
REM Create MPF.Check Debug archives
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net48\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net48.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win10-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_linux-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_win10-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_linux-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_osx-x64.zip *