mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-06-12 19:11:25 -07:00
cffc4cce07
Bug Fix: I forgot to adjust the Rename-Item PS command to rename the EXE before packaging.
48 lines
1.3 KiB
YAML
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
|