Rewrite session support #494
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: Nightly | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| # buildAvaloniaLinuxX64: | |
| # name: Build Avalonia Linux X64 | |
| # runs-on: windows-2025 | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Prepare Env | |
| # uses: microsoft/setup-msbuild@v2 | |
| # - name: Build | |
| # env: | |
| # DOTNET_NOLOGO: true | |
| # run: | | |
| # dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=linux-x64 | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: LRReader.Avalonia.Desktop.Linux-X64 | |
| # path: LRReader.Avalonia.Desktop/publish/linux-x64 | |
| # buildAvaloniaMacOSX64: | |
| # name: Build Avalonia macOS X64 | |
| # runs-on: windows-2025 | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Prepare Env | |
| # uses: microsoft/setup-msbuild@v2 | |
| # - name: Build | |
| # env: | |
| # DOTNET_NOLOGO: true | |
| # run: | | |
| # dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=macos-x64 | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: LRReader.Avalonia.Desktop.macOS-X64 | |
| # path: LRReader.Avalonia.Desktop/publish/macos-x64 | |
| # buildAvaloniaWinX64: | |
| # name: Build Avalonia Windows X64 | |
| # runs-on: windows-2025 | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Prepare Env | |
| # uses: microsoft/setup-msbuild@v2 | |
| # - name: Build | |
| # env: | |
| # DOTNET_NOLOGO: true | |
| # run: | | |
| # dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=win-x64 | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: LRReader.Avalonia.Desktop.Win-X64 | |
| # path: LRReader.Avalonia.Desktop/publish/win-x64 | |
| buildUWP: | |
| name: Sideload | |
| runs-on: windows-2025 | |
| permissions: | |
| packages: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Install .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Find MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build | |
| env: | |
| CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }} | |
| CERT_GPG: ${{ secrets.CERT_GPG }} | |
| CERT_BASE64: ${{ secrets.CERT_BASE64 }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| run: | | |
| [IO.File]::WriteAllBytes("./Cert.pfx.gpg", [Convert]::FromBase64String("${env:CERT_BASE64}")) | |
| & "C:\Program Files\Git\usr\bin\gpg.exe" --quiet --batch --yes --decrypt --passphrase="${env:CERT_GPG}" --output Cert.pfx Cert.pfx.gpg | |
| $Thumbprint = (Import-PfxCertificate .\Cert.pfx -Password (ConvertTo-SecureString "${env:CERT_PASSWORD}" -AsPlainText -Force) -CertStoreLocation Cert:\CurrentUser\My).Thumbprint | |
| Remove-Item -Path "./Cert.pfx.gpg","./Cert.pfx" | |
| Move-Item -Path "./Util/Package.appxmanifest" -Destination "./LRReader.UWP/Package.appxmanifest" -Force | |
| Invoke-Expression "./Util/Version.ps1" | |
| Invoke-Expression "./Util/ConfigureAppCenter.ps1" | |
| dotnet restore .\LRReader.UWP\LRReader.UWP.csproj -a arm64 | |
| dotnet restore .\LRReader.UWP\LRReader.UWP.csproj -a x64 | |
| MSBuild LRReader.UWP\LRReader.UWP.csproj -nologo -r -v:minimal /p:Nightly=true /p:Deterministic=true /p:ContinuousIntegrationBuild=true /p:Configuration=Release /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="$Thumbprint" /p:GenerateAppInstallerFile=True /p:AppInstallerUri="https://s3.guerra24.net/projects/lrr/nightly" /p:GenerateAppxPackageOnBuild=true | |
| Invoke-Expression "./Util/CleanInstaller.ps1" | |
| - name: Prepare for upload | |
| run: ./Util/PrepareForUpload.ps1 | |
| - name: Setup sentry-cli | |
| uses: matbour/setup-sentry-cli@v2 | |
| with: | |
| version: 2.39.1 | |
| token: ${{ secrets.SENTRY_TOKEN }} | |
| organization: ${{ secrets.SENTRY_ORG }} | |
| project: ${{ secrets.SENTRY_PROJECT }} | |
| - name: Upload Symbols | |
| run: | | |
| Set-Location "./LRReader.UWP/AppPackages/LRReader.UWP" | |
| Get-ChildItem *.appxsym -File | Rename-Item -NewName { [IO.Path]::ChangeExtension($_.name, "zip") } | |
| foreach ($file in $(Get-ChildItem *.zip -File)) { sentry-cli debug-files upload --include-sources --wait $file } | |
| Remove-Item $(Get-ChildItem *.zip -File) | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Upload to S3 | |
| env: | |
| AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
| run: aws s3 sync LRReader.UWP/AppPackages s3://${env:AWS_S3_BUCKET}/projects/lrr/nightly --no-progress --acl public-read --follow-symlinks --delete | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: LRReader.UWP | |
| path: LRReader.UWP/AppPackages | |
| buildModernInstaller: | |
| name: Modern Installer | |
| runs-on: windows-2025 | |
| permissions: | |
| packages: read | |
| strategy: | |
| matrix: | |
| arch: [x64, arm64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Install .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Find MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build | |
| env: | |
| APP_INSTALLER_URL: https://s3.guerra24.net/projects/lrr/nightly/LRReader.UWP.appinstaller | |
| run: | | |
| .\Util\Version.ps1 | |
| [xml]$xmlDoc = Get-Content "./LRReader.UWP/Package.appxmanifest" | |
| $env:APP_VERSION="$($xmlDoc.Package.Identity.Version)" | |
| .\Util\ConfigureInstaller.ps1 "$(Get-Location)/LRReader.UWP.ModernInstaller/Program.cs" | |
| MSBuild LRReader.UWP.ModernInstaller\LRReader.UWP.ModernInstaller.csproj -nologo -r -v:minimal /t:Publish /p:_IsPublishing=true /p:PublishProfile="win-${{ matrix.arch }}" /p:Configuration=Release /p:Platform=${{ matrix.arch }} /p:Deterministic=true /p:ContinuousIntegrationBuild=true | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ModernInstaller-${{ matrix.arch }} | |
| path: LRReader.UWP.ModernInstaller/bin/publish/win-${{ matrix.arch }}/LRReader.UWP.ModernInstaller.exe | |
| buildInstaller: | |
| name: Installer | |
| runs-on: windows-2025 | |
| permissions: | |
| packages: read | |
| strategy: | |
| matrix: | |
| arch: [x64, ARM64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Find MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build | |
| env: | |
| APP_VERSION: Nightly | |
| run: | | |
| .\Util\ConfigureInstaller.ps1 "$(Get-Location)/LRReader.UWP.Installer/Variables.cs" | |
| MSBuild LRReader.UWP.Installer\LRReader.UWP.Installer.csproj -nologo -r -v:minimal /p:Configuration=Release /p:Platform=${{ matrix.arch }} /p:Deterministic=true /p:ContinuousIntegrationBuild=true | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Installer-${{ matrix.arch }} | |
| path: LRReader.UWP.Installer/bin/${{ matrix.arch }}/Release/net472/LRReader.UWP.Installer.exe | |
| purgeUWPCache: | |
| name: Purge UWP Nightly cache | |
| needs: buildUWP | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Purge cache | |
| uses: jakejarvis/cloudflare-purge-action@master | |
| env: | |
| CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
| CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
| PURGE_URLS: '["https://s3.guerra24.net/projects/lrr/nightly/index.html", "https://s3.guerra24.net/projects/lrr/nightly/LRReader.UWP.appinstaller"]' |