Skip to content

Delete old launcher after downloading new one #61

Delete old launcher after downloading new one

Delete old launcher after downloading new one #61

name: 'Build launcher'
on:
push:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'src/**'
- '*.sln'
- '*.props'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'src/**'
- '*.sln'
- '*.props'
defaults:
run:
shell: pwsh
jobs:
publish:
name: 'Publish'
strategy:
matrix:
system:
- windows-2022
config:
- Release
runtime:
- win-x86
- win-x64
runs-on: ${{ matrix.system }}
env:
Project: src\ImeSense.Launchers.Belarus.Avalonia\ImeSense.Launchers.Belarus.Avalonia.csproj
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: '7.0.x'
- name: Publish launcher
run: |
dotnet publish $env:Project `
--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: 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@v3
with:
name: sblauncher-${{ matrix.runtime }}-${{ github.sha }}
path: bin/Release/${{ matrix.runtime }}/publish/
#- name: Upload installer
# uses: actions/upload-artifact@v3
# if: matrix.runtime == 'win-x86'
# with:
# name: sbinstaller-${{ github.sha }}
# path: src/ImeSense.Launchers.Belarus.Setup/Output/