Merge pull request #218 from kgen-llc/dependabot/nuget/Microsoft.Exte… #232
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
name: Main Build | |
on: | |
push: | |
branches: [ main ] | |
env: | |
CONFIGURATION: Release | |
FRAMEWORK: net6.0 | |
DOTNETVERSION: '6.0.x' | |
Actions_Allow_Unsecure_Commands: true # Allows AddPAth and SetEnv commands | |
jobs: | |
build-windows: | |
if: false | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/[email protected] | |
with: | |
dotnet-version: ${{env.DOTNETVERSION}} | |
# Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Update manifest version | |
run: | | |
[xml]$directoryProps = get-content "Directory.Build.Props" | |
[xml]$manifest = get-content "TeslaVideoCenter.Windows.Package/Package.appxmanifest" | |
$manifest.Package.Identity.Version = $directoryProps.Project.PropertyGroup.VersionPrefix + "." + (Get-Date).DayOfYear + "." + $env:GITHUB_RUN_NUMBER | |
$manifest.save("TeslaVideoCenter.Windows.Package/Package.appxmanifest") | |
- name: Install dependencies | |
run: msbuild /t:Restore /p:Configuration=${{ env.Configuration }} /p:RuntimeIdentifier=win10-x64 | |
#- name: Build | |
# run: dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore | |
#- name: Test | |
# run: dotnet test --no-restore --verbosity normal | |
# Build the Windows Application Packaging project | |
- name: Build the Windows Application Packaging Project (wapproj) | |
run: msbuild TeslaVideoCenter.Windows.Package/TeslaVideoCenter.Windows.Package.wapproj /p:Platform=${{ env.TargetPlatform }} /p:Configuration=${{ env.Configuration }} /p:UapAppxPackageBuildMode=${{ env.BuildMode }} /p:AppxBundle=${{ env.AppxBundle }} /p:PackageCertificatePassword=${{ secrets.PFXPASSWORD}} | |
env: | |
AppxBundle: Never | |
BuildMode: SideLoadOnly | |
TargetPlatform: x64 | |
- name: Upload Windows App | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Windows-App | |
path: TeslaVideoCenter.Windows.Package/AppPackages/ | |
macos-bundle: | |
runs-on: macOS-latest | |
defaults: | |
run: | |
working-directory: TeslaVideoCenter.Mac | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{env.DOTNETVERSION}} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
- name: Publish MacOS | |
run: dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-x64 -property:Configuration=${{ env.CONFIGURATION }} | |
- name: Archive MacOS App | |
run: tar -cf TeslaVideoCenter.tar 'Tesla Video Center.app' | |
working-directory: TeslaVideoCenter.Mac/bin/${{ env.CONFIGURATION }}/${{ env.FRAMEWORK}}/osx-x64/publish/ | |
- name: Upload MacOS App | |
uses: actions/upload-artifact@v2 | |
with: | |
name: MacOS-App | |
path: 'TeslaVideoCenter.Mac/bin/${{ env.CONFIGURATION }}/${{ env.FRAMEWORK}}/osx-x64/publish/TeslaVideoCenter.tar' |