-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #288 from MartinZikmund/feature/ci
- Loading branch information
Showing
3 changed files
with
90 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build Windows Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
create_package: | ||
|
||
strategy: | ||
matrix: | ||
configuration: [Release] | ||
platform: [x86,x64,ARM64] | ||
|
||
runs-on: windows-latest # For a list of available runner types, refer to | ||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
|
||
env: | ||
Solution_Fullname: src/MZikmund.sln | ||
App_Project_Fullname: src/app/MZikmund.App/MZikmund.App.csproj | ||
App_Project_Path: src/app/MZikmund.App | ||
STEP_TIMEOUT_MINUTES: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Dependencies | ||
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }} | ||
uses: "./.github/steps/install_dependencies" | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1.3.1 | ||
|
||
# Restore the application to populate the obj folder with RuntimeIdentifiers | ||
- name: Restore the application | ||
run: msbuild $env:App_Project_Fullname /t:Restore /p:Configuration=$env:Configuration /p:PublishReadyToRun=true | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
# Create the app package by building and packaging the project | ||
- name: Create the app package | ||
run: msbuild $env:App_Project_Fullname /p:TargetFramework=net8.0-windows10.0.22621 /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GenerateAppxPackageOnBuild=true | ||
env: | ||
Appx_Bundle: Never | ||
Appx_Package_Build_Mode: CI | ||
Appx_Package_Dir: Packages\ | ||
Configuration: ${{ matrix.configuration }} | ||
Platform: ${{ matrix.platform }} | ||
|
||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | ||
- name: Upload MSIX package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: MSIX_Package_${{ matrix.platform }} | ||
path: ${{ env.App_Project_Path }}\\Packages | ||
|
||
merge: | ||
runs-on: windows-latest | ||
needs: create_package | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: MSIX | ||
delete-merged: true | ||
pattern: MSIX_Package_* | ||
retention-days: 10 |
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