build #3
Workflow file for this run
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: build | |
env: | |
DOTNET_SDK_VERSION: '7.0.*' | |
on: | |
workflow_call: | |
inputs: | |
build-app-kind: | |
required: false | |
type: string | |
default: "CLI, WPF, Xamarin.Mac" | |
build-configuration: | |
required: true | |
type: string | |
custom-suffix: | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
build-app-kind: | |
description: "Kind of Application" | |
required: false | |
type: string | |
default: "CLI, WPF, Xamarin.Mac" | |
build-configuration: | |
description: "Build configuration for msbuild" | |
required: true | |
type: choice | |
options: | |
- Debug | |
- Release | |
custom-suffix: | |
description: "Custom suffix for artifact name" | |
required: false | |
type: string | |
default: "" | |
jobs: | |
#-------------------------------------------------------------- | |
# CLI | |
#-------------------------------------------------------------- | |
cli-build: | |
if: contains(inputs.build-app-kind, 'CLI') | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | |
- name: CLI Build | |
run: dotnet msbuild /nologo /t:Archive /p:Configuration=${{ inputs.build-configuration }} /p:PublishDir=${{ github.workspace }}/publish $ProjectFile | |
shell: bash | |
env: | |
ProjectFile: KeySwitchManager/Sources/Runtime/Applications/CLI/publish.msbuild | |
- name: Artifact CLI | |
uses: actions/upload-artifact@v3 | |
with: | |
name: KeySwitchManager.CLI-${{ inputs.build-configuration }}${{ inputs.custom-suffix }}-${{ github.sha }} | |
path: ${{ github.workspace }}/publish/KeySwitchManager.CLI*/ | |
#-------------------------------------------------------------- | |
# WPF | |
#-------------------------------------------------------------- | |
wpf-build: | |
if: contains(inputs.build-app-kind, 'WPF') | |
runs-on: windows-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | |
- name: WPF Build | |
run: dotnet msbuild /nologo /t:Archive /p:Configuration=${{ inputs.build-configuration }} /p:PublishDir=${{ github.workspace }}/publish %ProjectFile% | |
shell: cmd | |
env: | |
ProjectFile: KeySwitchManager/Sources/Runtime/Applications/WPF/publish.msbuild | |
- name: Artifact WPF | |
uses: actions/upload-artifact@v3 | |
with: | |
name: KeySwitchManager.WPF-${{ inputs.build-configuration }}${{ inputs.custom-suffix }}-${{ github.sha }} | |
path: ${{ github.workspace }}/publish/KeySwitchManager.WPF*/ | |
#-------------------------------------------------------------- | |
# WPF | |
#-------------------------------------------------------------- | |
xmarin-mac-build: | |
if: contains(inputs.build-app-kind, 'Xamarin.Mac') | |
runs-on: macos-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | |
- name: Xamarin.Mac Build | |
run: dotnet msbuild /nologo /t:Archive /p:Configuration=${{ inputs.build-configuration }} /p:PublishDir=${{ github.workspace }}/publish $ProjectFile | |
shell: bash | |
env: | |
ProjectFile: KeySwitchManager/Sources/Runtime/Applications/WPF/publish.msbuild | |
- name: Artifact Xamarin.Mac | |
uses: actions/upload-artifact@v3 | |
with: | |
name: KeySwitchManager.Xamarin.Mac-${{ inputs.build-configuration }}${{ inputs.custom-suffix }}-${{ github.sha }} | |
path: ${{ github.workspace }}/publish/KeySwitchManager.Xamarin.Mac*/ |