l10n: Crowdin updates #1600
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: Windows Release Builder | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v** | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
xaml-lint: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.x' | |
- name: Restore dotnet tools | |
run: dotnet tool restore | |
- name: Lint XAML files | |
run: .\scripts\lint-xaml.ps1 | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- uses: actions/cache@v4 | |
with: | |
path: ~\.nuget\packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Fetch Gomplate | |
uses: dsaltares/fetch-gh-release-asset@1.1.2 | |
with: | |
repo: hairyhenderson/gomplate | |
version: tags/v3.11.3 | |
file: gomplate_windows-amd64-slim.exe | |
target: gomplate.exe | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Render secrets | |
env: | |
APPCENTER_API_KEY: ${{ secrets.APPCENTER_API_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
run: Get-Content Screenbox/Secrets.cs.template | .\gomplate.exe | Set-Content Screenbox/Secrets.cs | |
- name: Get tag version | |
id: get-tag-version | |
if: github.ref_type == 'tag' | |
run: | | |
$found = "${{ github.ref_name }}" -match 'v*(\d+.\d+.\d+)' | |
if ($found) { $match = $matches[1] } | |
"version=$match" >> $env:GITHUB_OUTPUT | |
- name: Update package manifest | |
run: .\scripts\update-manifest.ps1 -Version "${{ steps.get-tag-version.outputs.version }}" | |
- name: Build store package | |
run: | | |
msbuild Screenbox.sln ` | |
-v:d ` | |
-p:RestoreConfigFile=nuget.config ` | |
-p:RestoreLockedMode=true ` | |
-p:Configuration=Release ` | |
-p:Platform=x64 ` | |
-p:AppxBundle=Always ` | |
-p:AppxBundlePlatforms="$env:BuildPlatforms" ` | |
-p:UapAppxPackageBuildMode=$env:BuildMode ` | |
-p:AppxPackageDir=$env:PackageDir ` | |
-p:AppxPackageSigningEnabled=false ` | |
-restore | |
env: | |
BuildMode: StoreUpload | |
BuildPlatforms: x86|x64|arm64 | |
PackageDir: C:\DeployOutput | |
- name: Create store-upload artifact | |
uses: actions/upload-artifact@v4 | |
if: github.ref_type == 'tag' | |
with: | |
name: store-upload | |
path: | | |
C:\DeployOutput\*.msixupload | |
C:\DeployOutput\*.appxupload | |
- name: Create sideload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Screenbox-sideload | |
path: | | |
C:\DeployOutput\*_Test | |
wack: | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Screenbox-sideload | |
path: C:\Download\ | |
- name: Rename test folder | |
run: Get-ChildItem -Directory -Path C:\Download\Screenbox_*_Test | Rename-Item -NewName Screenbox | |
- name: Rename test package | |
run: Get-ChildItem -Path C:\Download\Screenbox\*.msixbundle | Rename-Item -NewName Screenbox.msixbundle | |
- uses: huynhsontung/wack-certification@main | |
with: | |
name: 'WACK' | |
package-path: 'C:\Download\Screenbox\Screenbox.msixbundle' | |
report-name: 'Screenbox.Certification.xml' | |
ignore-rules: '38' | |
release: | |
needs: build | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download package | |
uses: actions/download-artifact@v4 | |
with: | |
name: Screenbox-sideload | |
path: download/ | |
- name: Zip artifact | |
run: zip -r sideload.zip download/ | |
- name: Generate GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
sideload.zip |