Add thumbnail overlay in reader #350
This file contains 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-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- 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@v3 | |
with: | |
name: LRReader.Avalonia.Desktop.Linux-X64 | |
path: LRReader.Avalonia.Desktop/publish/linux-x64 | |
buildAvaloniaMacOSX64: | |
name: Build Avalonia macOS X64 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- 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@v3 | |
with: | |
name: LRReader.Avalonia.Desktop.macOS-X64 | |
path: LRReader.Avalonia.Desktop/publish/macos-x64 | |
buildAvaloniaWinX64: | |
name: Build Avalonia Windows X64 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- 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@v3 | |
with: | |
name: LRReader.Avalonia.Desktop.Win-X64 | |
path: LRReader.Avalonia.Desktop/publish/win-x64 | |
buildUWP: | |
name: Build UWP | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- name: Build | |
env: | |
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }} | |
CERT_GPG: ${{ secrets.CERT_GPG }} | |
CERT_BASE64: ${{ secrets.CERT_BASE64 }} | |
APPCENTER_APP_ID: ${{ secrets.APPCENTER_APP_ID }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
run: | | |
Move-Item -Path "./Util/Package.appxmanifest" -Destination "$(Get-Location)/LRReader.UWP/Package.appxmanifest" -Force | |
[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 | |
Invoke-Expression "./Util/Version.ps1 ${env:BUILD_NUMBER}" | |
Invoke-Expression "./Util/ConfigureAppCenter.ps1" | |
MSBuild LRReader.UWP\LRReader.UWP.csproj -nologo -r -v:minimal /p:Nightly=true /p:Configuration=Release /p:UapAppxPackageBuildMode="SideloadOnly" /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="" /p:PackageCertificateKeyFile="..\Cert.pfx" /p:PackageCertificatePassword="${env:CERT_PASSWORD}" /p:GenerateAppInstallerFile=True /p:AppInstallerUri="https://s3.guerra24.net/projects/lrr/nightly" | |
Remove-Item -Path "./Cert.pfx.gpg","./Cert.pfx" | |
Invoke-Expression "./Util/CleanInstaller.ps1" | |
- name: Prepare for upload | |
run: ./Util/PrepareForUpload.ps1 | |
- name: Upload Symbols | |
run: | | |
Set-Location "./LRReader.UWP/AppPackages/LRReader.UWP" | |
Remove-Item $(Get-ChildItem *.appxsym -File) | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
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@v3 | |
with: | |
name: LRReader.UWP | |
path: LRReader.UWP/AppPackages | |
buildInstallerX64: | |
name: Build Installer X64 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- name: Build | |
env: | |
APP_VERSION: Nightly | |
run: | | |
Invoke-Expression "./Util/ConfigureInstaller.ps1" | |
MSBuild LRReader.UWP.Installer\LRReader.UWP.Installer.csproj -nologo -r -v:minimal /p:Configuration=Release /p:Platform=x64 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Installer-x64 | |
path: LRReader.UWP.Installer/bin/x64/Release/net472/LRReader.UWP.Installer.exe | |
buildInstallerARM64: | |
name: Build Installer ARM64 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Env | |
uses: microsoft/setup-msbuild@v1.3 | |
- name: Build | |
env: | |
APP_VERSION: Nightly | |
run: | | |
Invoke-Expression "./Util/ConfigureInstaller.ps1" | |
MSBuild LRReader.UWP.Installer\LRReader.UWP.Installer.csproj -nologo -r -v:minimal /p:Configuration=Release /p:Platform=ARM64 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Installer-ARM64 | |
path: LRReader.UWP.Installer/bin/ARM64/Release/net472/LRReader.UWP.Installer.exe | |
purgeUWPCache: | |
name: Purge UWP Nightly cache | |
needs: buildUWP | |
runs-on: ubuntu-20.04 | |
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"]' |