-
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.
- Loading branch information
1 parent
c3da451
commit 7e17824
Showing
1 changed file
with
27 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,20 @@ jobs: | |
|
||
env: | ||
Solution_Path: Watermarker.sln | ||
TargetApplication: Watermarker\Watermarker.csproj | ||
InstallerApplication: Watermarker.Installer\Watermarker.Installer.csproj | ||
TargetApplicationProjectFile: Watermarker.csproj | ||
InstallerApplicationProjectFile: Watermarker.Installer.csproj | ||
TargetApplicationDirectory: Watermarker | ||
InsatllerApplicationDirectory: Watermarker.Installer | ||
ZipPrefix: watermarker | ||
ZipInstaller: watermarker-installer.zip | ||
ArtifactName: WatermarkerInstaller | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Nerdbank.GitVersioning to set version variables | ||
uses: dotnet/nbgv@master | ||
id: nbgv | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
|
@@ -45,13 +46,6 @@ jobs: | |
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
# Update the version before build | ||
#- name: Update manifest version | ||
# run: | | ||
# [xml]$manifest = get-content ".\$env:Wap_Project_Directory\Package.appxmanifest" | ||
# $manifest.Package.Identity.Version = "${{ steps.nbgv.outputs.SimpleVersion }}.0" | ||
# $manifest.save(".\$env:Wap_Project_Directory\Package.appxmanifest") | ||
|
||
# Restore the application to populate the obj folder with RuntimeIdentifiers | ||
- name: Restore the application | ||
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier | ||
|
@@ -61,21 +55,33 @@ jobs: | |
|
||
# Build main application | ||
- name: Build the main application | ||
run: msbuild $env:TargetApplication /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration | ||
run: msbuild $env:TargetApplicationDirectory/$env:TargetApplicationProjectFile /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: Release | ||
TargetPlatform: ${{ matrix.targetplatform }} | ||
|
||
# Build installer | ||
- name: Build installer | ||
run: msbuild $env:InstallerApplication /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration | ||
run: msbuild $env:InsatllerApplicationDirectory/$env:InstallerApplicationProjectFile /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: Release | ||
TargetPlatform: ${{ matrix.targetplatform }} | ||
|
||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | ||
#- name: Upload build artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: MSIX Package | ||
# path: src\${{ env.Wap_Project_Directory }}\${{ env.App_Packages_Directory }} | ||
- name: Pack application into zip | ||
uses: vimtor/[email protected] | ||
with: | ||
files: src/$env:TargetApplicationDirectory/bin/${{ matrix.targetplatform }}/${{ matrix.configuration }}/net6.0-windows/ | ||
dest: src/$env:InsatllerApplicationDirectory/bin/${{ matrix.targetplatform }}/${{ matrix.configuration }}/net6.0-windows/$env:ZipPrefix-${{github.ref_name}}.zip | ||
|
||
- name: Pack release with installer | ||
uses: vimtor/[email protected] | ||
with: | ||
files: src/$env:InsatllerApplicationDirectory/bin/${{ matrix.targetplatform }}/${{ matrix.configuration }}/net6.0-windows/ | ||
dest: src/$env:InsatllerApplicationDirectory/bin/${{ matrix.targetplatform }}/${{ matrix.configuration }}/net6.0-windows/$env:ZipInstaller-${{github.ref_name}}.zip | ||
|
||
# Upload artifacts: https://github.com/marketplace/actions/upload-a-build-artifact | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ArtifactName }} | ||
path: src/$env:InsatllerApplicationDirectory/bin/${{ matrix.targetplatform }}/${{ matrix.configuration }}/net6.0-windows/$env:ZipInstaller-${{github.ref_name}}.zip |