Skip to content

Bump actions/checkout from 3.5.3 to 4.1.0 #42

Bump actions/checkout from 3.5.3 to 4.1.0

Bump actions/checkout from 3.5.3 to 4.1.0 #42

Workflow file for this run

name: MSBuild
on: [push]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
APPX_PACKAGE_DIR: AppxPackages
X64_TAR_FILE_ADDRESS: https://releases.aosc.io/os-amd64/container/aosc-os_container_20210602_amd64.tar.xz
X64_TAR_FILE_HASH: 975a21b5a1a27ff97a142494ec15cb6566ecce2572046704c89e3d8a4a297ddb
ARM64_TAR_FILE_ADDRESS: https://releases.aosc.io/os-arm64/container/aosc-os_container_20210602_arm64.tar.xz
ARM64_TAR_FILE_HASH: 88bdea5f6a533d1635d9f9f697917c5e9c7f86c211965e4279d5644e343d5e52
jobs:
build:
runs-on: windows-2019
strategy:
matrix:
platform: [ARM64, x64]
steps:
- uses: actions/[email protected]
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
with:
vs-prerelease: true
- name: Restore NuGet packages
run: nuget.exe restore $env:SOLUTION_FILE_PATH
- name: Download tar files for ARM64
if: ${{matrix.platform == '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
if: ${{matrix.platform == '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: Download package signing certificate
env:
PACKAGE_SIGNING_CERTIFICATE: ${{secrets.PACKAGE_SIGNING_CERTIFICATE}}
run: |
"$env:PACKAGE_SIGNING_CERTIFICATE" > .\AOSCOSLauncher-Appx\AOSCOSLauncher-Appx_TemporaryKey_Base64.pfx
certutil.exe -decode .\AOSCOSLauncher-Appx\AOSCOSLauncher-Appx_TemporaryKey_Base64.pfx .\AOSCOSLauncher-Appx\AOSCOSLauncher-Appx_TemporaryKey.pfx
shell: pwsh
- name: Build
env:
BUILD_PLATFORM: ${{matrix.platform}}
# 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=$env:BUILD_CONFIGURATION /p:Platform=$env:BUILD_PLATFORM /p:AppxBundlePlatforms=$env:BUILD_PLATFORM /p:AppxPackageDir=${env:APPX_PACKAGE_DIR}_$env:BUILD_PLATFORM /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload $env:SOLUTION_FILE_PATH
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: AppxPackages_${{matrix.platform}}
path: AOSCOSLauncher-Appx\AppxPackages_${{matrix.platform}}