Skip to content

2.10.0

2.10.0 #3

Workflow file for this run

name: Build and Release
on:
release:
types: [published]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target-cpu: x86_64
target-os: win64
artifact: DiskImageManager-win64.zip
- target-cpu: i386
target-os: win32
artifact: DiskImageManager-win32.zip
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: stable
with-cache: false
- name: Install i386-win32 cross-compiler
if: matrix.target-cpu == 'i386'
shell: pwsh
run: |
$fpcBin = Split-Path (Get-Command fpc.exe).Source
$fpcBase = Split-Path (Split-Path $fpcBin)
$url = "https://sourceforge.net/projects/freepascal/files/Win32/3.2.2/fpc-3.2.2.i386-win32.cross.x86_64-win64.exe/download"
$installer = "$env:TEMP\fpc-cross-i386.exe"
Invoke-WebRequest -Uri $url -OutFile $installer -UseBasicParsing -UserAgent "Mozilla/5.0"
Start-Process -FilePath $installer -ArgumentList "/VERYSILENT","/SUPPRESSMSGBOXES","/DIR=$fpcBase" -Wait -NoNewWindow
- name: Build package
run: lazbuild --add-package Source/DIMComponents.lpk
- name: Build application
run: >
lazbuild -B
--cpu=${{ matrix.target-cpu }}
--os=${{ matrix.target-os }}
Source/DiskImageManager.lpi
- name: Package
shell: pwsh
run: |
$exe = Get-ChildItem -Path out -Recurse -Filter "DiskImageManager.exe" | Select-Object -First 1
Compress-Archive -Path $exe.FullName -DestinationPath ${{ matrix.artifact }}
- name: Upload release asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ${{ matrix.artifact }}