From 5cf3660a47077bb53307e74ad1554e157e4c32e4 Mon Sep 17 00:00:00 2001 From: "Hiroaki@R-Koubou" Date: Wed, 15 Nov 2023 22:58:10 +0900 Subject: [PATCH] =?UTF-8?q?WIP=20=E6=89=8B=E5=8B=95=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E7=94=A8Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_apps_manually.yml | 92 +++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/build_apps_manually.yml diff --git a/.github/workflows/build_apps_manually.yml b/.github/workflows/build_apps_manually.yml new file mode 100644 index 00000000..1d534dad --- /dev/null +++ b/.github/workflows/build_apps_manually.yml @@ -0,0 +1,92 @@ +name: "Build Apps (Manually)" + +env: + DOTNET_SDK_VERSION: '7.0.*' + +on: + workflow_call: + inputs: + build-app-kind: + required: true + type: string + build-configuration: + required: true + type: string + + workflow_dispatch: + inputs: + build-app-kind: + description: "Kind of Application" + required: true + type: string + default: "CLI, WPF, Xamarin.Mac" + build-configuration: + description: "Build configuration" + required: true + type: choice + options: + - Debug + - Release + +jobs: + #-------------------------------------------------------------- + # CLI + #-------------------------------------------------------------- + cli-build: + if: contains(github.event.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@v2 + + - name: Install SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.DOTNET_SDK_VERSION }} + + - name: CLI Build + run: dotnet msbuild /nologo /t:Archive /p:Configuration=${{ inputs.build-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@v2 + with: + name: KeySwitchManager.CLI-dev + path: ${{ github.workspace }}/publish/KeySwitchManager.CLI*/ + + #-------------------------------------------------------------- + # WPF + #-------------------------------------------------------------- + wpf-build: + if: contains(github.event.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@v2 + + - name: Install SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.DOTNET_SDK_VERSION }} + + - name: WPF Build + run: dotnet msbuild /nologo /t:Archive /p:Configuration=Debug /p:PublishDir=${{ github.workspace }}/publish %ProjectFile% + shell: cmd + env: + ProjectFile: KeySwitchManager/Sources/Runtime/Applications/WPF/publish.msbuild + + - name: Artifact WPF + uses: actions/upload-artifact@v2 + with: + name: KeySwitchManager.WPF-${{ inputs.build-build-configuration }} + path: ${{ github.workspace }}/publish/KeySwitchManager.WPF*/