Skip to content

Commit

Permalink
Split build launcher workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicMercury8 committed Jan 27, 2024
1 parent 72cf0a6 commit 0b019e0
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 96 deletions.
96 changes: 0 additions & 96 deletions .github/workflows/build-launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,51 +72,6 @@ jobs:
name: launcher-avalonia-${{ matrix.framework }}-${{ matrix.config }}-${{ github.sha }}
path: bin/${{ matrix.config }}/

build-launcher-wpf:
name: 'Build launcher WPF'

strategy:
matrix:
system:
- windows-2022
config:
- Debug
- Release
framework:
- net7.0

runs-on: ${{ matrix.system }}

env:
LauncherProject: src\ImeSense.Launchers.Belarus.Legacy\ImeSense.Launchers.Belarus.Legacy.csproj

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'

- name: Restore dependencies
run: |
dotnet restore $env:LauncherProject
- name: Build launcher
run: |
dotnet build $env:LauncherProject `
--configuration ${{ matrix.config }} `
--no-restore
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.config }}-${{ github.sha }}
path: bin/${{ matrix.config }}/

build-updater-cli:
name: 'Build updater CLI'

Expand Down Expand Up @@ -213,57 +168,6 @@ jobs:
name: launcher-avalonia-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

publish-launcher-wpf:
name: 'Publish launcher WPF'

needs: build-launcher-wpf

strategy:
matrix:
system:
- windows-2022
config:
- Release
runtime:
- win-x86
- win-x64
framework:
- net7.0

runs-on: ${{ matrix.system }}

env:
LauncherProject: src\ImeSense.Launchers.Belarus.Legacy\ImeSense.Launchers.Belarus.Legacy.csproj

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'

- name: Publish launcher
run: |
dotnet publish $env:LauncherProject `
--configuration ${{ matrix.config }} `
--runtime ${{ matrix.runtime }} `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeAllContentForSelfExtract=true `
-p:EnableCompressionInSingleFile=true `
-p:DebugSymbols=false `
-p:DebugType=None
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

publish-updater-cli:
name: 'Publish updater CLI'

Expand Down
124 changes: 124 additions & 0 deletions .github/workflows/build-legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: 'Build legacy'

on:
push:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'src/**'
- '*.sln'
- '*.config'
- '*.props'
- '*.targets'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'src/**'
- '*.sln'
- '*.config'
- '*.props'
- '*.targets'

defaults:
run:
shell: pwsh

jobs:
build-launcher-wpf:
name: 'Build launcher WPF'

strategy:
matrix:
system:
- windows-2022
config:
- Debug
- Release
framework:
- net7.0

runs-on: ${{ matrix.system }}

env:
LauncherProject: src\ImeSense.Launchers.Belarus.Legacy\ImeSense.Launchers.Belarus.Legacy.csproj

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'

- name: Restore dependencies
run: |
dotnet restore $env:LauncherProject
- name: Build launcher
run: |
dotnet build $env:LauncherProject `
--configuration ${{ matrix.config }} `
--no-restore
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.config }}-${{ github.sha }}
path: bin/${{ matrix.config }}/

publish-launcher-wpf:
name: 'Publish launcher WPF'

needs: build-launcher-wpf

strategy:
matrix:
system:
- windows-2022
config:
- Release
runtime:
- win-x86
- win-x64
framework:
- net7.0

runs-on: ${{ matrix.system }}

env:
LauncherProject: src\ImeSense.Launchers.Belarus.Legacy\ImeSense.Launchers.Belarus.Legacy.csproj

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'

- name: Publish launcher
run: |
dotnet publish $env:LauncherProject `
--configuration ${{ matrix.config }} `
--runtime ${{ matrix.runtime }} `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeAllContentForSelfExtract=true `
-p:EnableCompressionInSingleFile=true `
-p:DebugSymbols=false `
-p:DebugType=None
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

0 comments on commit 0b019e0

Please sign in to comment.