Skip to content

Commit

Permalink
Merge pull request #198 from LanceMcCarthy/release-sideload
Browse files Browse the repository at this point in the history
Q2 2024 Release
  • Loading branch information
LanceMcCarthy authored Jul 18, 2024
2 parents 185d692 + 6e90844 commit 7c7b759
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 105 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/cd_release_msstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Release (Microsoft Store)

on:
workflow_dispatch:
push:
branches:
- release-microsoft-store
Expand All @@ -14,17 +15,21 @@ jobs:
runs-on: windows-latest
env:
NugetConfigPath: src\nuget.config
WappProjectPath: 'src\MediaFileManager\PackageProject\PackageProject.wapproj'
WappProjectPath: src\MediaFileManager\PackageProject\PackageProject.wapproj
CommonProjectPath: src\MediaFileManager\MediaFileManager.Common\MediaFileManager.Common.csproj
WpfProjectPath: src\MediaFileManager\MediaFileManager.Desktop\MediaFileManager.Desktop.csproj
SolutionPath: src\MediaFileManager\MediaFileManager.sln
Configuration: Release
AppxBundlePlatforms: 'x86|x64|ARM64'
AppxBundlePlatforms: "x86|x64|arm64"
TFM: net6.0-windows10.0.19041.0
AppxBundleMode: Always
AppxBuildMode: SideloadOnly
AppxBuildMode: StoreUpload
AppxPackageSigningEnabled: False
GenerateAppInstallerFile: False
HoursBetweenUpdateChecks: 6
AppxPackageDirectory: 'D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\StoreUploadPackages\'
ArtifactsFilePath: 'D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\StoreUploadPackages\ReleasePackages.zip'
AppInstUri: 'https://dvlup.blob.core.windows.net/general-app-files/Installers/MediaFileManager/'
AppxPackageDirectory: D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\StoreUploadPackages\
ArtifactsFilePath: D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\StoreUploadPackages\ReleasePackages.zip
AppInstUri: https://dvlup.blob.core.windows.net/general-app-files/Installers/MediaFileManager/
TELERIK_NUGET_KEY: ${{ secrets.TELERIK_NUGET_KEY }}

steps:
Expand All @@ -43,6 +48,9 @@ jobs:
$buildDay = Get-Date -Format "yyyy.Mdd"
$runNumber = "$env:GITHUB_RUN_NUMBER"
$ver = $buildDay + "." + $runNumber + ".0"
echo "APP_VERSION=$ver"
#echo "APP_VERSION=$ver" >> $GITHUB_OUTPUT
#echo "APP_VERSION=$ver" >> "$GITHUB_ENV"
echo "::set-output name=APP_VERSION::$ver"
# Update the appxmanifest for Microsoft Store
Expand Down Expand Up @@ -87,15 +95,18 @@ jobs:
# ******************| TOOL INSTALL and DEPENDENCY RESTORE |********************* #

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
# Install the .NET SDK workload
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0'
dotnet-version: '8.0'

- name: Setup MSBuild.exe
uses: microsoft/[email protected].1
uses: microsoft/[email protected].2

# Use dotnet restore command for the solution (see RIDs https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)
- name: DotNet Restore
run: dotnet restore ${{ env.WappProjectPath }} --configfile ${{ env.NugetConfigPath }} --runtime ${{ env.TFM }}

# ************************| BUILD |************************ #

Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/cd_release_sideload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Release (sideload)

on:
workflow_dispatch:
push:
branches:
- release-sideload
Expand All @@ -16,23 +17,27 @@ jobs:
NugetConfigPath: src\nuget.config
Configuration: Release
SigningCertificate: LancelotSoftwareLLC.pfx
WapProjectDirectory: 'src\MediaFileManager\PackageProject'
WappProjectPath: 'src\MediaFileManager\PackageProject\PackageProject.wapproj'
AppxPackageDirectory: 'D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\SideLoadPackages\'
ArtifactsFilePath: 'D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\SideLoadPackages\SideLoadPackages.zip'
AppInstUri: 'https://dvlup.blob.core.windows.net/general-app-files/Installers/MediaFileManager/'
CommonProjectPath: src\MediaFileManager\MediaFileManager.Common\MediaFileManager.Common.csproj
WpfProjectPath: src\MediaFileManager\MediaFileManager.Desktop\MediaFileManager.Desktop.csproj
SolutionPath: src\MediaFileManager\MediaFileManager.sln
WapProjectDirectory: src\MediaFileManager\PackageProject
WappProjectPath: src\MediaFileManager\PackageProject\PackageProject.wapproj
AppxPackageDirectory: D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\SideLoadPackages\
ArtifactsFilePath: D:\a\MediaFileManager\MediaFileManager\src\MediaFileManager\PackageProject\SideLoadPackages\SideLoadPackages.zip
AppInstUri: https://dvlup.blob.core.windows.net/general-app-files/Installers/MediaFileManager/
TFM: net6.0-windows10.0.19041.0
TargetPlatform: "x64"
AppxBundlePlatforms: "x86|x64|ARM64"
AppxBundlePlatforms: "x86|x64|arm64"
AppxBundleMode: Always
AppxBuildMode: SideloadOnly
AppxPackageSigningEnabled: True
GenerateAppInstallerFile: True
HoursBetweenUpdateChecks: 6
HoursBetweenUpdateChecks: 12
TELERIK_NUGET_KEY: ${{ secrets.TELERIK_NUGET_KEY }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -46,6 +51,9 @@ jobs:
$buildDay = Get-Date -Format "yyyy.Mdd"
$runNumber = "$env:GITHUB_RUN_NUMBER"
$ver = $buildDay + "." + $runNumber + ".0"
echo "APP_VERSION=$ver"
#echo "APP_VERSION=$ver" >> $GITHUB_OUTPUT
#echo "APP_VERSION=$ver" >> "$GITHUB_ENV"
echo "::set-output name=APP_VERSION::$ver"
# Update the appxmanifest for SideLoad (and signing with PFX)
Expand Down Expand Up @@ -84,15 +92,18 @@ jobs:
# ******************| TOOL INSTALL and DEPENDENCY RESTORE |********************* #

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
# Install the .NET SDK workload
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0'
dotnet-version: '8.0'

- name: Setup MSBuild.exe
uses: microsoft/[email protected].1
uses: microsoft/[email protected].2

# Use dotnet restore command for the solution (see RIDs https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)
- name: DotNet Restore
run: dotnet restore ${{ env.WappProjectPath }} --configfile ${{ env.NugetConfigPath }} --runtime ${{ env.TFM }}

# ************************| BUILD AND DISTRIBUTION |************************ #

Expand All @@ -105,8 +116,11 @@ jobs:
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
# Build using SideLoad and AppInstaller instructions (requires code signing)
- name: Restore wapproj
run: msbuild ${{ env.WappProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }}

- name: Build wapproj for Sideloading
run: msbuild ${{ env.WappProjectPath }} /t:Restore /p:GenerateAppInstallerFile=${{ env.GenerateAppInstallerFile }} /p:AppInstallerUri=${{ env.AppInstUri }} /p:HoursBetweenUpdateChecks=${{ env.HoursBetweenUpdateChecks }} /p:AppxPackageDir=${{ env.AppxPackageDirectory }} /p:Configuration=${{ env.Configuration }} /p:UapAppxPackageBuildMode=${{ env.AppxBuildMode }} /p:AppxBundle=${{ env.AppxBundleMode }} /p:PackageCertificateKeyFile=${{ env.SigningCertificate }} /p:PackageCertificatePassword=${{ env.CertPrivateKey }} /p:PackageCertificateThumbprint=${{ env.CertThumbprint }} /p:AppxPackageSigningEnabled=${{ env.AppxPackageSigningEnabled }} /p:Platform=${{ env.TargetPlatform }} /p:AppxBundlePlatforms="${{ env.AppxBundlePlatforms }}"
run: msbuild ${{ env.WappProjectPath }} /p:GenerateAppInstallerFile=${{ env.GenerateAppInstallerFile }} /p:AppInstallerUri=${{ env.AppInstUri }} /p:HoursBetweenUpdateChecks=${{ env.HoursBetweenUpdateChecks }} /p:AppxPackageDir=${{ env.AppxPackageDirectory }} /p:Configuration=${{ env.Configuration }} /p:UapAppxPackageBuildMode=${{ env.AppxBuildMode }} /p:AppxBundle=${{ env.AppxBundleMode }} /p:PackageCertificateKeyFile=${{ env.SigningCertificate }} /p:PackageCertificatePassword=${{ env.CertPrivateKey }} /p:PackageCertificateThumbprint=${{ env.CertThumbprint }} /p:AppxPackageSigningEnabled=${{ env.AppxPackageSigningEnabled }} /p:Platform=${{ env.TargetPlatform }} /p:AppxBundlePlatforms="${{ env.AppxBundlePlatforms }}"
env:
CertPrivateKey: ${{ secrets.LancelotSoftwareCert_Key }}
CertThumbprint: ${{ secrets.LancelotSoftwareCert_Thumbprint }}
Expand All @@ -115,7 +129,7 @@ jobs:
# This automatically distributes the sideLoad package, which users can visit the index.html page and run the appinstaller
- name: Uploading appInstaller to Azure Blob
id: sideload-blob-upload
uses: LanceMcCarthy/Action-AzureBlobUpload@v1.9.0
uses: LanceMcCarthy/Action-AzureBlobUpload@v3
with:
connection_string: "${{ secrets.AZURE_DVLUP_BLOB_CONNECTION_STRING }}"
container_name: general-app-files
Expand Down
55 changes: 35 additions & 20 deletions .github/workflows/ci_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Development

on:
workflow_dispatch:
push:
branches:
- main-dev
Expand All @@ -13,44 +14,58 @@ jobs:
build_dev:
runs-on: windows-latest
env:
TFM: net7.0-windows10.0.19041.0
RID: win-x64
CommonProjectPath: src\MediaFileManager\MediaFileManager.Common\MediaFileManager.Common.csproj
TFM: net6.0-windows10.0.19041.0
WpfProjectPath: src\MediaFileManager\MediaFileManager.Desktop\MediaFileManager.Desktop.csproj
WappProjectPath: src\MediaFileManager\PackageProject\PackageProject.wapproj
SolutionPath: src\MediaFileManager\MediaFileManager.sln
UwpProjectPath: src\MediaFileManager\PackageProject\PackageProject.wapproj
AppxBundlePlatforms: "x86|x64|arm64"
TargetPlatform: "x64"
AppxBundleMode: Never
AppxBuildMode: CI
NugetConfigPath: src\nuget.config
Configuration: Debug
AppxPackageSigningEnabled: False
GenerateAppInstallerFile: False
TELERIK_NUGET_KEY: ${{ secrets.TELERIK_NUGET_KEY }}

steps:
# - name: Generate version number with date and workflow Run Number
# id: version-creator
# run: |
# $buildDay = Get-Date -Format "yyyy.Mdd"
# $runNumber = "$env:GITHUB_RUN_NUMBER"
# $ver = $buildDay + "." + $runNumber + ".0"
# echo "APP_VERSION=$ver"
# echo "APP_VERSION_OUTPUT=$ver" >> $GITHUB_OUTPUT
# echo "APP_VERSION_VAR=$ver" >> $GITHUB_ENV
# echo "::set-output name=APP_VERSION::$ver"

# - name: verify outputs and vars
# run: |
# echo "Output (using environment file): ${{ steps.version-creator.outputs.APP_VERSION_OUTPUT }}"
# echo "Env Var (using environment file): ${{ env.APP_VERSION_VAR }}"
# echo "Output (using deprecated set-output): ${{ steps.version-creator.outputs.APP_VERSION }}"

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

# Install the .NET 6 workload
- name: Install .NET 6
uses: actions/setup-dotnet@v3
# Install the .NET SDK workload
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0'
dotnet-version: '8.0'

# Add msbuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected].1
uses: microsoft/[email protected].2

# Use dotnet restore command for the solution (see RIDs https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)
- name: DotNet Restore
run: dotnet restore ${{ env.SolutionPath }} --configfile ${{ env.NugetConfigPath }} --runtime ${{ env.RID }}

# Restore class library project to populate the obj folder
- name: Build the Class library
run: msbuild ${{ env.CommonProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:RuntimeIdentifier=${{ env.RID }}

# Restore WPF project to populate the obj folder
- name: Build the Wpf project
run: msbuild ${{ env.WpfProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:RuntimeIdentifier=${{ env.RID }}
run: dotnet restore ${{ env.WappProjectPath }} --configfile ${{ env.NugetConfigPath }} --runtime ${{ env.TFM }}

# We're not building the MSIX package, no need for wasting time and CPU cycles for quick dev build
# - name: Build the Windows Application Packaging Project (wapproj)
# run: msbuild ${{ env.WappProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:Platform=${{ env.TargetPlatform }} /p:UapAppxPackageBuildMode=${{ env.AppxBuildMode }} /p:AppxBundle=${{ env.AppxBundleMode }} /p:AppxPackageSigningEnabled=${{ env.AppxPackageSigningEnabled }} /p:GenerateAppInstallerFile=${{ env.GenerateAppInstallerFile }} /p:AppxBundlePlatforms="${{ env.AppxBundlePlatforms }}"
- name: Build the Windows Application Packaging Project (wapproj)
run: msbuild ${{ env.WappProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:Platform=${{ env.TargetPlatform }} /p:UapAppxPackageBuildMode=${{ env.AppxBuildMode }} /p:AppxBundle=${{ env.AppxBundleMode }} /p:AppxPackageSigningEnabled=${{ env.AppxPackageSigningEnabled }} /p:GenerateAppInstallerFile=${{ env.GenerateAppInstallerFile }} /p:AppxBundlePlatforms="${{ env.AppxBundlePlatforms }}"
21 changes: 15 additions & 6 deletions .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Main

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -16,17 +17,21 @@ jobs:
NugetConfigPath: src\nuget.config
Configuration: Release
WappProjectPath: src\MediaFileManager\PackageProject\PackageProject.wapproj
CommonProjectPath: src\MediaFileManager\MediaFileManager.Common\MediaFileManager.Common.csproj
WpfProjectPath: src\MediaFileManager\MediaFileManager.Desktop\MediaFileManager.Desktop.csproj
SolutionPath: src\MediaFileManager\MediaFileManager.sln
TFM: net6.0-windows10.0.19041.0
TargetPlatform: "x64"
AppxBuildMode: CI
AppxBundlePlatforms: "x86|x64|ARM|ARM64"
AppxBundlePlatforms: "x86|x64|arm64"
AppxBundleMode: Never
AppxPackageSigningEnabled: False
GenerateAppInstallerFile: False
TELERIK_NUGET_KEY: ${{ secrets.TELERIK_NUGET_KEY }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -64,16 +69,20 @@ jobs:
$assemblyInfoPath = "src\MediaFileManager\MediaFileManager.Desktop\Properties\AssemblyInfo.cs"
SetAssemblyFileVersion $assemblyInfoPath "${{ steps.version-creator.outputs.APP_VERSION }}"
- name: Install .NET Core
uses: actions/setup-dotnet@v3
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0'
dotnet-version: '8.0'

- name: Setup MSBuild.exe
uses: microsoft/[email protected].1
uses: microsoft/[email protected].2
with:
msbuild-architecture: x64

# Use dotnet restore command for the solution (see RIDs https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)
- name: DotNet Restore
run: dotnet restore ${{ env.WappProjectPath }} --configfile ${{ env.NugetConfigPath }} --runtime ${{ env.TFM }}

# Build the WAP project. BuildMode is set to CI so we do not have to generate actual packages.
- name: Build the Windows Application Packaging Project (wapproj)
run: msbuild ${{ env.WappProjectPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:Platform=${{ env.TargetPlatform }} /p:UapAppxPackageBuildMode=${{ env.AppxBuildMode }} /p:AppxBundle=${{ env.AppxBundleMode }} /p:AppxPackageSigningEnabled=${{ env.AppxPackageSigningEnabled }} /p:GenerateAppInstallerFile=${{ env.GenerateAppInstallerFile }} /p:AppxBundlePlatforms="${{ env.AppxBundlePlatforms }}"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
Loading

0 comments on commit 7c7b759

Please sign in to comment.