Add RAIL_WINDOW to default ignore list #21
Workflow file for this run
This file contains hidden or 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: Microsoft Store Build | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| channel: [StoreUpload] | |
| targetPlatform: [x64] | |
| include: | |
| - channel: StoreUpload | |
| ChannelName: StoreUpload | |
| Configuration: Release | |
| DistributionUrl: https://github.com/FancyWM/fancywm | |
| MsixPackageId: 2203VeselinKaraganev.FancyWM | |
| MsixPublisherId: CN=18A4315F-5918-494C-B473-035F554CB857 | |
| MsixPackageDisplayName: FancyWM | |
| runs-on: windows-latest | |
| env: | |
| App_Packages_Bundle: FancyWM.${{ matrix.ChannelName }}.${{ matrix.targetplatform }}.msixbundle | |
| App_Packages_Directory: AppPackages | |
| SigningCertificate: FancyWMGithubActions.pfx | |
| Solution_Path: FancyWM.sln | |
| Test_Project_Path: FancyWM.Tests\FancyWM.Tests.csproj | |
| Wpf_Project_Path: FancyWM\FancyWM.csproj | |
| Wap_Project_Directory: FancyWM.Package | |
| Wap_Project_Name: FancyWM.Package.wapproj | |
| Actions_Allow_Unsecure_Commands: true # Allows AddPAth and SetEnv commands | |
| steps: | |
| # Install the .NET workload | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup Windows SDK | |
| uses: GuillaumeFalourd/[email protected] | |
| with: | |
| sdk-version: 18362 | |
| # Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/[email protected] | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Use Nerdbank.GitVersioning to set version variables | |
| uses: dotnet/nbgv@master | |
| id: nbgv | |
| # Update the appxmanifest before build by setting the per-channel values set in the matrix such as | |
| # the Package.Identity.Version or the Package.Identity.Name, which allows multiple channels to be built. | |
| - name: Update manifest version | |
| run: | | |
| [xml]$manifest = get-content ".\$env:Wap_Project_Directory\Package.appxmanifest" | |
| $manifest.Package.Identity.Version = "${{ steps.nbgv.outputs.SimpleVersion }}.0" | |
| $manifest.Package.Identity.Name = "${{ matrix.MsixPackageId }}" | |
| $manifest.Package.Identity.Publisher = "${{ matrix.MsixPublisherId }}" | |
| $manifest.Package.Properties.DisplayName = "${{ matrix.MsixPackageDisplayName }}" | |
| $manifest.Package.Applications.Application.VisualElements.DisplayName = "${{ matrix.MsixPackageDisplayName }}" | |
| $manifest.save(".\$env:Wap_Project_Directory\Package.appxmanifest") | |
| # Decode the Base64 encoded Pfx | |
| - name: Decode the Pfx | |
| run: | | |
| $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") | |
| $currentDirectory = Get-Location | |
| $certificatePath = Join-Path -Path $currentDirectory -ChildPath $env:Wap_Project_Directory -AdditionalChildPath $env:SigningCertificate | |
| [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) | |
| # Restore the application | |
| - name: Restore the Wpf application to populate the obj folder | |
| run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier | |
| env: | |
| Configuration: ${{ matrix.Configuration }} | |
| RuntimeIdentifier: win-${{ matrix.targetplatform }} | |
| # Execute all unit tests in the solution | |
| # - name: Execute unit tests | |
| # run: dotnet test | |
| # Build the Windows Application Packaging project for StoreUpload | |
| - name: Build the Windows Application Packaging Project (wapproj) for ${{ matrix.ChannelName }} | |
| run: msbuild $env:Solution_Path /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundlePlatforms="${{ matrix.targetplatform }}" /p:AppxBundle=$env:AppxBundle /p:GenerateAppInstallerFile=$env:GenerateAppInstallerFile /p:AppxPackageSigningEnabled=$env:AppxPackageSigningEnabled /p:PackageCertificateKeyFile=$env:SigningCertificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} | |
| env: | |
| AppxBundle: Always | |
| AppxPackageSigningEnabled: True | |
| BuildMode: StoreUpload | |
| Configuration: ${{ matrix.Configuration }} | |
| GenerateAppInstallerFile: False | |
| TargetPlatform: ${{ matrix.targetplatform }} | |
| # Remove the .pfx | |
| - name: Remove the .pfx | |
| run: Remove-Item -path $env:Wap_Project_Directory\$env:SigningCertificate | |
| # Archive the package | |
| - name: Create archive | |
| run: | | |
| $BundlePath = (ls $env:Wap_Project_Directory\$env:App_Packages_Directory\*\*${{ matrix.targetplatform }}.msixbundle)[0].FullName | |
| $BundlePath = $BundlePath -replace '\\','/' | |
| $SelfSignedCerPath = (ls $env:Wap_Project_Directory\$env:App_Packages_Directory\*\*${{ matrix.targetplatform }}.cer)[0].FullName | |
| $SelfSignedCerPath = $SelfSignedCerPath -replace '\\','/' | |
| echo "App_Packages_Bundle_Path=$BundlePath" >> $env:GITHUB_ENV | |
| echo "App_Packages_Cer_Path=$SelfSignedCerPath" >> $env:GITHUB_ENV | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| prerelease: ${{ steps.nbgv.outputs.PublicRelease }} | |
| files: | | |
| ${{ env.App_Packages_Bundle_Path }} | |
| ${{ env.App_Packages_Cer_Path }} |