Skip to content

Commit

Permalink
Split pack installer pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicMercury8 committed Jan 27, 2024
1 parent 3d16e94 commit 72cf0a6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-hasher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ jobs:
- name: Upload hasher
uses: actions/upload-artifact@v4
with:
name: hasher-cli-${{ matrix.framework }}-${{ matrix.runtime }}-${{ matrix.config }}-${{ github.sha }}
name: hasher-cli-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/
63 changes: 19 additions & 44 deletions .github/workflows/build-launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-avalonia-${{ matrix.framework }}-${{ matrix.runtime }}-${{ matrix.config }}-${{ github.sha }}
name: launcher-avalonia-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

publish-launcher-wpf:
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.runtime }}-${{ matrix.config }}-${{ github.sha }}
name: launcher-wpf-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

publish-updater-cli:
Expand Down Expand Up @@ -312,11 +312,15 @@ jobs:
- name: Upload updater
uses: actions/upload-artifact@v4
with:
name: updater-cli-${{ matrix.framework }}-${{ matrix.runtime }}-${{ matrix.config }}-${{ github.sha }}
name: updater-cli-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

publish:
name: 'Publish'
pack-installer:
name: 'Pack installer'

needs:
- publish-launcher-avalonia
- publish-updater-cli

strategy:
matrix:
Expand All @@ -326,66 +330,37 @@ jobs:
- Release
runtime:
- win-x86
- win-x64
framework:
- net7.0

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

env:
LauncherProject: src\ImeSense.Launchers.Belarus.Avalonia\ImeSense.Launchers.Belarus.Avalonia.csproj
UpdaterProject: src\ImeSense.Launchers.Belarus.Updater\ImeSense.Launchers.Belarus.Updater.csproj

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

- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Get launcher
uses: actions/download-artifact@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: launcher-avalonia-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

- name: Publish updater
run: |
dotnet publish $env:UpdaterProject `
--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: Get updater
uses: actions/download-artifact@v4
with:
name: updater-cli-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
path: bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/

- name: Publish installer
if: matrix.runtime == 'win-x86'
shell: cmd
run: |
"%ProgramFiles(x86)%\Inno Setup 6\iscc.exe" src\ImeSense.Launchers.Belarus.Setup\Setup.iss
- name: Upload launcher
uses: actions/upload-artifact@v4
with:
name: sblauncher-${{ matrix.runtime }}-${{ github.sha }}
path: bin/Release/${{ matrix.runtime }}/publish/

- name: Upload installer
uses: actions/upload-artifact@v4
if: matrix.runtime == 'win-x86'
with:
name: sbinstaller-${{ github.sha }}
name: installer-${{ matrix.runtime }}-${{ github.sha }}
path: bin/SBLauncherInstaller.exe

0 comments on commit 72cf0a6

Please sign in to comment.