-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (85 loc) · 3.4 KB
/
Copy pathrelease.yml
File metadata and controls
105 lines (85 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Release Pipeline
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET 10 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install WASM Workload
run: dotnet workload install wasm-tools
- name: Restore Dependencies
run: dotnet restore LocalLLMServerManager.slnx
- name: Build Solution
run: dotnet build LocalLLMServerManager.slnx -c Release --no-restore
- name: Run Test Suite
run: dotnet test LocalLLMServerManager.Tests/LocalLLMServerManager.Tests.csproj --nologo -c Release --no-build
- name: Build & Publish Avalonia WebAssembly UI
shell: powershell
run: |
dotnet publish LocalLLMServerManager.Web/LocalLLMServerManager.Web.csproj -c Release -o wwwroot_wasm --nologo
Remove-Item -Path "wwwroot\app.js" -ErrorAction SilentlyContinue
Remove-Item -Path "wwwroot\index.css" -ErrorAction SilentlyContinue
Remove-Item -Path "wwwroot\index.html" -ErrorAction SilentlyContinue
Remove-Item -Path "wwwroot\wwwroot" -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item -Path "wwwroot_wasm\wwwroot\*" -Destination "wwwroot" -Recurse -Force
Remove-Item -Path "wwwroot_wasm" -Recurse -Force
- name: Publish Self-Contained Release (win-x64)
run: |
dotnet publish LocalLLMServerManager.csproj -c Release -r win-x64 --self-contained -o publish --nologo /p:PublishSingleFile=false
- name: Create Release Zip Archive
shell: powershell
run: |
New-Item -ItemType Directory -Path dist -Force
Compress-Archive -Path "publish\*" -DestinationPath "dist\LocalLLMServerManager-${{ github.ref_name }}-win-x64.zip" -Force
- name: Install Inno Setup
run: choco install innosetup -y
- name: Compile Inno Setup Installer
shell: powershell
run: |
$iscc = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
if (-not (Test-Path $iscc)) { $iscc = "C:\Program Files\Inno Setup 6\ISCC.exe" }
& "$iscc" scripts/installer.iss
- name: Package Installer Executable
shell: powershell
run: |
$setupExe = Get-ChildItem -Path . -Filter "LocalLLMServerManager-*-Setup.exe" | Select-Object -First 1
if ($setupExe) {
Move-Item -Path $setupExe.FullName -Destination "dist\LocalLLMServerManager-${{ github.ref_name }}-Setup.exe" -Force
}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.zip
dist/*.exe
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Container Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
tags: localllmservermanager:${{ github.ref_name }}