Skip to content

workflow: refactor

workflow: refactor #50

Workflow file for this run

name: MSBuild
on: [push]
env:
ARM64_TAR_FILE_ADDRESS: https://releases.aosc.io/os-arm64/wsl/aosc-os_wsl_20240101_arm64.tar.gz
ARM64_TAR_FILE_HASH: d59044fd00fa9c0ec4cf77a38b1b9be715df82dc2bc84385f11229319b1457a4
X64_TAR_FILE_ADDRESS: https://releases.aosc.io/os-amd64/wsl/aosc-os_wsl_20240101_amd64.tar.gz
X64_TAR_FILE_HASH: f6d7184cbe1a4dace6fcbd0fb9fef5c9af371441c2fbbac790a812e77c0ec235
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
with:
vs-prerelease: true
- name: Restore NuGet packages
run: nuget.exe restore .
- name: Download tar files for ARM64
run: |
New-Item -Path .\ARM64 -ItemType Directory
Invoke-WebRequest -Uri $env:ARM64_TAR_FILE_ADDRESS -OutFile .\ARM64\install.tar.gz
if ((Get-FileHash -Path .\ARM64\install.tar.gz).Hash -ne "$env:ARM64_TAR_FILE_HASH") {throw "ARM64 tar file hash not match."}
shell: pwsh
- name: Download tar files for x64
run: |
New-Item -Path .\x64 -ItemType Directory
Invoke-WebRequest -Uri $env:X64_TAR_FILE_ADDRESS -OutFile .\x64\install.tar.gz
if ((Get-FileHash -Path .\x64\install.tar.gz).Hash -ne "$env:X64_TAR_FILE_HASH") {throw "x64 tar file hash not match."}
shell: pwsh
- name: Build
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: |
msbuild.exe /m /p:Configuration=Release /p:Platform="x64|ARM64" /p:AppxBundlePlatforms="x64|ARM64" /p:AppxPackageDir=AppxPackages_x64_arm64 /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload .
- name: Upload CI artifact
uses: actions/upload-artifact@v4
with:
name: AppxPackages_x64_arm64_appxupload
path: AOSCOSLauncher-Appx\AppxPackages_x64_arm64\*.appxupload
- name: Upload sideload artifact
uses: actions/upload-artifact@v4
with:
name: AppxPackages_x64_arm64_Test
path: AOSCOSLauncher-Appx\AppxPackages_x64_arm64\AOSCOSLauncher-Appx_*_Test