Skip to content

Commit

Permalink
Merge pull request #61 from r-koubou/feature/ci_build
Browse files Browse the repository at this point in the history
Feature/ci build
  • Loading branch information
r-koubou authored Nov 15, 2023
2 parents b220150 + 5ef21e5 commit e62ac17
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 123 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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*/
52 changes: 0 additions & 52 deletions .github/workflows/build_apps_develop.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/build_apps_release.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/build_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: develop

on:
push:
branches:
- develop
paths-ignore:
- "**.md"

workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
with:
build-app-kind: "CLI, WPF, Xamarin.Mac"
build-configuration: Debug
10 changes: 0 additions & 10 deletions KeySwitchManager/Sources/Runtime/Applications/CLI/VERSION.md

This file was deleted.

10 changes: 0 additions & 10 deletions KeySwitchManager/Sources/Runtime/Applications/WPF/VERSION.md

This file was deleted.

0 comments on commit e62ac17

Please sign in to comment.