Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5bfa committed Nov 1, 2023
1 parent 5cf469c commit 4b9cfeb
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,28 @@ on:
- 'docs/**'
- '*.md'

env:
APPLICATION_NAME: 'Files'
SOLUTION_NAME: 'Files.sln'
PACKAGE_PROJECT_DIR: 'src\Files.App (Package)'
PACKAGE_PROJECT_PATH: 'src\Files.App (Package)\Files.Package.wapproj'
TEST_PROJECT_PATH: 'tests\Files.InteractionTests\Files.InteractionTests.csproj'
WORKING_DIR: ${{ github.workspace }} # Default: D:\a\Files\Files\
ARTIFACTS_STAGING_DIR: ${{ github.workspace }}\artifacts
APPX_PACKAGE_DIR: ${{ github.workspace }}\artifacts\AppxPackages

jobs:
build-test:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [Debug]
platform: [x64, arm64]
env:
APPLICATION_NAME: 'Files'
SOLUTION_NAME: 'Files.sln'
PACKAGE_PROJECT_DIR: 'src\Files.App (Package)'
PACKAGE_PROJECT_PATH: 'src\Files.App (Package)\Files.Package.wapproj'
TEST_PROJECT_PATH: 'tests\Files.InteractionTests\Files.InteractionTests.csproj'
CONFIGURATION: ${{ matrix.configuration }}
PLATFORM: ${{ matrix.platform }}
APPX_BUNDLE_PLATFORMS: ${{ matrix.platform }}
WORKING_DIR: ${{ github.workspace }} # Default: D:\a\Files\Files\
ARTIFACTS_STAGING_DIR: ${{ github.workspace }}\artifacts
APPX_PACKAGE_DIR: ${{ github.workspace }}\artifacts\AppxPackages

steps:
- name: Checkout the repository
Expand All @@ -52,7 +54,7 @@ jobs:
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'

- name: Restore ${{ env.APPLICATION_NAME }}
- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
Expand All @@ -61,9 +63,11 @@ jobs:
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true
- name: Build & Publish ${{ env.APPLICATION_NAME }}
- name: Build & Publish Files
run: |
msbuild
msbuild $env:SOLUTION_NAME `
-t:Build `
-t:_GenerateAppxPackage `
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:PLATFORM `
-p:AppxBundlePlatforms=$env:APPX_BUNDLE_PLATFORMS `
Expand All @@ -72,6 +76,31 @@ jobs:
-p:AppxPackageDir=$env:APPX_PACKAGE_DIR `
-p:AppxPackageSigningEnabled=true
- name: Upload the packages to GitHub Actions
uses: actions/upload-artifact@v3
with:
name: 'Appx Packages (${{ env.CONFIGURATION }}, ${{ env.PLATFORM }})'
path: ${{ env.ARTIFACTS_STAGING_DIR }}

test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [Debug]
platform: [x64, arm64]
env:
CONFIGURATION: ${{ matrix.configuration }}
PLATFORM: ${{ matrix.platform }}
APPX_BUNDLE_PLATFORMS: ${{ matrix.platform }}

steps:

- uses: actions/download-artifact@v3
with:
name: 'Appx Packages (${{ env.CONFIGURATION }}, ${{ env.PLATFORM }})'
path: ${{ env.APPX_PACKAGE_DIR }}

- name: Install package
shell: pwsh
run: |
Expand Down

0 comments on commit 4b9cfeb

Please sign in to comment.