Update dependencies #137
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: Publishing | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - hotfix/* | |
| - release/* | |
| tags: | |
| - v*.*.* | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: windows-latest | |
| environment: microsoft-store | |
| strategy: | |
| matrix: | |
| architecture: | |
| - x86 | |
| - x64 | |
| - arm64 | |
| distribution: | |
| - app-store | |
| - standalone | |
| format: | |
| - msix | |
| - msi | |
| exclude: | |
| - distribution: app-store | |
| format: msi | |
| - distribution: standalone | |
| format: msix | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ matrix.architecture }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.architecture }}-nuget- | |
| - name: Set up MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Prepare files | |
| run: .\prepare | |
| - name: Restore Nuget packages | |
| run: | | |
| msbuild Fyreplace ` | |
| /t:Restore ` | |
| /p:Platform=${{ matrix.architecture }} ` | |
| /p:PublishReadyToRun=true | |
| - name: Build app | |
| if: ${{ matrix.distribution == 'app-store' }} | |
| env: | |
| PackageName: ${{ vars.PACKAGE_NAME }} | |
| PackagePublisher: ${{ vars.PACKAGE_PUBLISHER }} | |
| PackagePublisherName: ${{ vars.PACKAGE_PUBLISHER_NAME }} | |
| SentryDsn: ${{ secrets.SENTRY_DSN}} | |
| SentryOrg: ${{ vars.SENTRY_ORG }} | |
| SentryProject: ${{ vars.SENTRY_PROJECT }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| run: | | |
| msbuild Fyreplace ` | |
| /t:Build ` | |
| /p:Platform=${{ matrix.architecture }} ` | |
| /p:Configuration=Release ` | |
| /p:GenerateAppxPackageOnBuild=True ` | |
| /p:AppxPackageDir=AppPackages\ | |
| - name: Build app | |
| if: ${{ matrix.distribution == 'standalone' && matrix.format == 'msix' }} | |
| env: | |
| PackageName: ${{ vars.PACKAGE_NAME }} | |
| PackagePublisher: ${{ vars.PACKAGE_PUBLISHER_STANDALONE }} | |
| PackagePublisherName: ${{ vars.PACKAGE_PUBLISHER_NAME }} | |
| run: | | |
| msbuild Fyreplace ` | |
| /t:Build ` | |
| /p:Platform=${{ matrix.architecture }} ` | |
| /p:Configuration=Release ` | |
| /p:GenerateAppxPackageOnBuild=True ` | |
| /p:AppxPackageDir=AppPackages\ | |
| - name: Build app | |
| if: ${{ matrix.format == 'msi' }} | |
| env: | |
| PackagePublisherName: ${{ vars.PACKAGE_PUBLISHER_NAME }} | |
| run: | | |
| msbuild Fyreplace.Installer ` | |
| /t:Build ` | |
| /p:Platform=${{ matrix.architecture }} ` | |
| /p:Configuration=Release ` | |
| /p:SDKSelfContained=true | |
| - name: Simplify MSIX path | |
| if: ${{ matrix.format == 'msix' }} | |
| run: | | |
| ren .\Fyreplace\AppPackages\* Result | |
| ren .\Fyreplace\AppPackages\Result\*.msix Fyreplace.msix | |
| move .\Fyreplace\AppPackages\Result\Fyreplace.msix .\Deploy\ | |
| - name: Simplify MSI path | |
| if: ${{ matrix.format == 'msi' }} | |
| run: | | |
| move .\Fyreplace.Installer\bin\${{ matrix.architecture }}\Release\en\Fyreplace.msi .\Deploy\ | |
| - name: Upload MSIX | |
| if: ${{ matrix.distribution == 'app-store' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Fyreplace.${{ matrix.architecture }}.msix | |
| path: Deploy\Fyreplace.msix | |
| if-no-files-found: error | |
| - name: Upload ${{ matrix.format == 'msix' && 'MSIX' || 'MSI' }} | |
| if: ${{ matrix.distribution == 'standalone' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Fyreplace.${{ matrix.architecture }}.standalone.${{ matrix.format }} | |
| path: Deploy\Fyreplace.${{ matrix.format }} | |
| if-no-files-found: error | |
| test: | |
| name: Test | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| architecture: | |
| - x64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ matrix.architecture }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.architecture }}-nuget- | |
| - name: Set up MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Prepare files | |
| run: .\prepare | |
| - name: Restore Nuget packages | |
| run: | | |
| msbuild Fyreplace.Tests ` | |
| /t:Restore ` | |
| /p:Platform=${{ matrix.architecture }} | |
| - name: Build app | |
| run: | | |
| msbuild Fyreplace.Tests ` | |
| /t:Build ` | |
| /p:Platform=${{ matrix.architecture }} ` | |
| /p:Configuration=Debug | |
| - name: Run tests | |
| run: | | |
| .\vs vstest.console ` | |
| Fyreplace.Tests\bin\${{ matrix.architecture }}\Debug\*\win-${{ matrix.architecture }}\Fyreplace.Tests.build.appxrecipe |