Files
CreamInstaller/.github/workflows/ci-builds.yml
T
Frog cffc4cce07 Update ci-builds.yml
Bug Fix: I forgot to adjust the Rename-Item PS command to rename the EXE before packaging.
2025-11-19 22:04:24 -08:00

48 lines
1.3 KiB
YAML

name: CI Builds
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore CreamInstaller.sln
- name: Build Release
run: dotnet build CreamInstaller.sln --configuration Release --no-restore
- name: Publish single-file
run: dotnet publish CreamInstaller.sln -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true --output ./publish
- name: Set short commit SHA
id: vars
run: |
$shortSha = $env:GITHUB_SHA.Substring(0,7)
Write-Output "shortSha=$shortSha" >> $env:GITHUB_ENV
shell: pwsh
- name: Rename EXE with short commit SHA
run: |
Rename-Item -Path ./publish/CreamInstaller.exe -NewName "CreamInstaller-CI-$env:shortSha.exe"
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: CreamInstaller-CI-Release-${{ env.shortSha }}
path: ./publish/CreamInstaller-CI-${{ env.shortSha }}.exe