Fix | large image #10
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: Debug-Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths-ignore: | |
| - '.github/**' | |
| - '.editorconfig' | |
| - '.gitattributes' | |
| - '.gitignore' | |
| - '.gitmodules' | |
| - 'LICENSE.txt' | |
| - 'README.md' | |
| - 'README_EN.md' | |
| - 'ShadowViewer.sln' | |
| - 'vercel.json' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| configuration: [Debug] | |
| platform: [x64, x86, arm64] | |
| runs-on: windows-latest | |
| env: | |
| Solution_Name: ShadowViewer | |
| steps: | |
| - name: Delay | |
| run: sleep 10 | |
| - uses: mickem/clean-after-action@v1 | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: | | |
| 9.0.x | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Restore the application | |
| run: msbuild $env:Solution_Name/$env:Solution_Name.csproj /t:Restore /p:Configuration=$env:Configuration /p:GithubAction=true | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| - name: Decode the pfx | |
| run: | | |
| $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.BASE64_ENCODED_PFX }}") | |
| $certificatePath = "GitHubActionsWorkflow.pfx" | |
| [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) | |
| - name: Create the app package | |
| run: msbuild $env:Solution_Name/$env:Solution_Name.csproj /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=../GitHubActionsWorkflow.pfx /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GithubAction=true | |
| env: | |
| Appx_Bundle: Never | |
| Appx_Package_Build_Mode: SideloadOnly | |
| Appx_Package_Dir: ..\Packages\ | |
| Configuration: ${{ matrix.configuration }} | |
| Platform: ${{ matrix.platform }} | |
| - name: Get Version | |
| run: | | |
| [xml]$proj = Get-Content $env:Solution_Name/Package.appxmanifest | |
| $v = $proj.Package.Identity.Version | |
| echo "VERSION=$v" >> $env:GITHUB_ENV | |
| - name: Remove the pfx | |
| run: | | |
| Remove-Item -path GitHubActionsWorkflow.pfx | |
| - name: Upload MSIX package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.Solution_Name }}_${{ env.VERSION }}_${{ matrix.platform }}_${{ matrix.configuration }} | |
| path: | | |
| Packages/${{ env.Solution_Name }}*/*.* | |
| Packages/${{ env.Solution_Name }}*/Add-AppDevPackage.resources | |
| Packages/${{ env.Solution_Name }}*/Dependencies/${{ matrix.platform }}/*.* |