-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ci/cd workflows * fix dotnet version * attempt to set ACTIONS_ALLOW_UNSECURE_COMMANDS * Update ci.yml * Update ci.yml * Checkout * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update ci.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml * Update cd.yml
- Loading branch information
Showing
3 changed files
with
201 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,115 @@ | ||
name: cd | ||
|
||
on: | ||
push: | ||
# tags: | ||
# - '*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
dotnet-version: ['7.0'] | ||
channel: [ Dev, Prod_Sideload, Prod_Store ] | ||
targetPlatform: [ Any CPU ] | ||
include: | ||
|
||
# includes the following variables for the matrix leg matching Dev | ||
- channel: Dev | ||
ChannelName: Dev | ||
Configuration: Debug | ||
#DistributionUrl: https://microsoft.github.io/github-actions-for-desktop-apps-distribution-dev | ||
MsixPackageId: ElevenPercent.Dev | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (Dev) | ||
|
||
# includes the following variables for the matrix leg matching Prod_Sideload | ||
- channel: Prod_Sideload | ||
Configuration: Release | ||
ChannelName: Prod_Sideload | ||
#DistributionUrl: https://microsoft.github.io/github-actions-for-desktop-apps-distribution-prod | ||
MsixPackageId: ElevenPercent.ProdSideload | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (ProdSideload) | ||
|
||
# includes the following variables for the matrix leg matching Prod_Store | ||
- channel: Prod_Store | ||
Configuration: Release | ||
ChannelName: Prod_Store | ||
DistributionUrl: | ||
MsixPackageId: ElevenPercent.ProdStore | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (ProdStore) | ||
|
||
steps: # Update the appxmanifest before build by setting the per-channel values set in the matrix. | ||
- uses: actions/checkout@v3 | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 7.0.201 | ||
|
||
# - name: Update manifest version | ||
# run: | | ||
# [xml]$manifest = get-content ".\$env:Wap_Project_Directory\Package.appxmanifest" | ||
# $manifest.Package.Identity.Version = "$env:NBGV_SimpleVersion.0" | ||
# $manifest.Package.Identity.Name = "${{ matrix.MsixPackageId }}" | ||
# $manifest.Package.Identity.Publisher = "${{ matrix.MsixPublisherId }}" | ||
# $manifest.Package.Properties.DisplayName = "${{ matrix.MsixPackageDisplayName }}" | ||
# $manifest.Package.Applications.Application.VisualElements.DisplayName = "${{ matrix.MsixPackageDisplayName }}" | ||
# $manifest.save(".\$env:Wap_Project_Directory\Package.appxmanifest") | ||
|
||
- name: Set env variables | ||
run : | | ||
"ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $env:GITHUB_ENV | ||
# Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
# Restore the application | ||
- name: Restore the application to populate the obj folder | ||
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: Debug | ||
|
||
# Build the Windows Application Packaging project for Dev and Prod_Sideload | ||
- name: Build the Windows Application Packaging Project (wapproj) for ${{ matrix.ChannelName }} | ||
run: msbuild $env:Solution_Path /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode # /p:AppxBundle=$env:AppxBundle /p:PackageCertificateKeyFile=$env:SigningCertificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} | ||
if: matrix.ChannelName != 'Prod_Store' | ||
env: | ||
AppxBundle: Never | ||
AppInstallerUri: ${{ matrix.DistributionUrl }} | ||
BuildMode: SideLoadOnly | ||
Configuration: ${{ matrix.Configuration }} | ||
GenerateAppInstallerFile: True | ||
TargetPlatform: ${{ matrix.targetplatform }} | ||
|
||
# Build the Windows Application Packaging project for Prod_Store | ||
- name: Build the Windows Application Packaging Project (wapproj) for ${{ matrix.ChannelName }} | ||
run: msbuild $env:Solution_Path /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode # /p:AppxBundle=$env:AppxBundle /p:GenerateAppInstallerFile=$env:GenerateAppInstallerFile /p:AppxPackageSigningEnabled=$env:AppxPackageSigningEnabled | ||
if: matrix.ChannelName == 'Prod_Store' | ||
env: | ||
AppxBundle: Never | ||
AppxPackageSigningEnabled: False | ||
BuildMode: StoreOnly | ||
Configuration: ${{ matrix.Configuration }} | ||
GenerateAppInstallerFile: False | ||
TargetPlatform: ${{ matrix.targetplatform }} | ||
|
||
- name: tree | ||
run : | | ||
tree . | ||
- name: zip | ||
run: | | ||
Compress-Archive -DestinationPath Eleven-Percent.zip -Path Eleven-Percent\bin\${{matrix.Configuration}}\net7.0-windows\ | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: ElevenPercent.zip |
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,86 @@ | ||
name: ci | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
env: | ||
Solution_Path: eleven-percent.sln | ||
#Test_Project_Path: MyWpfApp.Tests\MyWpfApp.Tests.csproj | ||
Wpf_Project_Path: eleven-percent\eleven-percent.csproj | ||
Wap_Project_Directory: ElevenPercent.Package | ||
Wap_Project_Name: ElevenPercent.Package.wapproj | ||
strategy: | ||
matrix: | ||
dotnet-version: ['7.0'] | ||
channel: [ Dev, Prod_Sideload, Prod_Store ] | ||
targetPlatform: [ Any CPU ] | ||
include: | ||
|
||
# includes the following variables for the matrix leg matching Dev | ||
- channel: Dev | ||
ChannelName: Dev | ||
Configuration: Debug | ||
#DistributionUrl: https://microsoft.github.io/github-actions-for-desktop-apps-distribution-dev | ||
MsixPackageId: ElevenPercent.Dev | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (Dev) | ||
|
||
# includes the following variables for the matrix leg matching Prod_Sideload | ||
- channel: Prod_Sideload | ||
Configuration: Release | ||
ChannelName: Prod_Sideload | ||
#DistributionUrl: https://microsoft.github.io/github-actions-for-desktop-apps-distribution-prod | ||
MsixPackageId: ElevenPercent.ProdSideload | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (ProdSideload) | ||
|
||
# includes the following variables for the matrix leg matching Prod_Store | ||
- channel: Prod_Store | ||
Configuration: Release | ||
ChannelName: Prod_Store | ||
DistributionUrl: | ||
MsixPackageId: ElevenPercent.ProdStore | ||
MsixPublisherId: CN=jmorjsm | ||
MsixPackageDisplayName: ElevenPercent (ProdStore) | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 7.0.201 | ||
|
||
- name: Set env variables | ||
run : | | ||
"ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $env:GITHUB_ENV | ||
# Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
# Restore the application | ||
- name: Restore the application to populate the obj folder | ||
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: Debug | ||
|
||
# Build the Windows Application Packaging project | ||
- name: Build the Windows Application Packaging Project (wapproj) | ||
run: msbuild $env:Solution_Path /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration # /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundle=$env:AppxBundle # /p:PackageCertificateKeyFile=$env:SigningCertificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} | ||
env: | ||
AppxBundle: Never | ||
BuildMode: SideLoadOnly | ||
Configuration: Release | ||
TargetPlatform: ${{ matrix.targetplatform }} | ||
|
||
- name: tree | ||
run : | | ||
tree . | ||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MSIX Package | ||
path: ElevenPercent\bin\Release\net7.0-windows\eleven-percent.dll |