Skip to content

Bump actions/upload-artifact from 3 to 4 #319

Bump actions/upload-artifact from 3 to 4

Bump actions/upload-artifact from 3 to 4 #319

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
target: [ [x64, net471], [x86, net471], [x64_net6, net6.0-windows], [x86_net6, net6.0-windows], [arm64_net6, net6.0-windows] ]
runs-on: windows-latest
env:
installer: Installer\CairoShell.nsi
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install nbgv
uses: dotnet/nbgv@v0.4.1
id: nbgv
- name: Publish app
run: |
cd "Cairo Desktop\Cairo Desktop"
dotnet publish -p:PublishProfile=$env:Profile -p:Platform=$env:Platform -f $env:Framework
env:
Profile: ${{ matrix.target[0] }}
Framework: ${{ matrix.target[1] }}
Platform: ${{ matrix.target[0] == 'x86' && 'AnyCPU' || matrix.target[0] == 'x86_net6' && 'AnyCPU' || matrix.target[0] == 'x64' && 'x64' || matrix.target[0] == 'x64_net6' && 'x64' || 'ARM64' }}
- name: Set installer version
shell: pwsh
run: |
$fileContent = [System.IO.File]::ReadAllText("${{ env.installer }}").Replace("BUILD_VERSION", "${{ steps.nbgv.outputs.SimpleVersion }}")
[System.IO.File]::WriteAllText("${{ env.installer }}", $fileContent)
- name: Generate installer
run: makensis Installer\CairoShell_${{ matrix.target[0] }}.nsi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Installer ${{ matrix.target[0] == 'x86' && '32-bit' || matrix.target[0] == 'x86_net6' && '32-bit .NET 6' || matrix.target[0] == 'x64' && '64-bit' || matrix.target[0] == 'x64_net6' && '64-bit .NET 6' || 'ARM64' }}
path: 'Installer\*.exe'