-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (48 loc) · 1.92 KB
/
ci.yml
File metadata and controls
62 lines (48 loc) · 1.92 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
# This workflow is configured for Windows deployment by default.
# If you're deploying to a different platform (Linux, Cloud, etc.),
# you'll need to modify this configuration accordingly.
name: Build and publish
on:
push:
branches:
- main
jobs:
build:
# Using Windows runner by default. Change this for different platforms
runs-on: self-hosted
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup .NET 6 and .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
8.0.x
- name: Build
run: ./build.ps1 Compile
- name: Lint Check
run: ./build.ps1 LintCheck --skip Compile
- name: Unit Test
run: ./build.ps1 RunUnitTests --skip LintCheck
- name: Publish WebApp project
run: dotnet publish ./src/2-Clients/WebApp/WebApp.csproj -c Release -o ./output/WebApp
- name: Publish AdminPanel project
run: dotnet publish ./src/2-Clients/AdminPanel/AdminPanel.csproj -c Release -o ./output/AdminPanel
- name: Publish Api project
run: dotnet publish ./src/2-Clients/Api/Api.csproj -c Release -o ./output/Api
- name: Create WebApp.zip
run: |
Compress-Archive -Path ./output/WebApp/* -DestinationPath ./output/WebApp.zip
- name: Create AdminPanel.zip
run: |
Compress-Archive -Path ./output/AdminPanel/* -DestinationPath ./output/AdminPanel.zip
- name: Create Api.zip
run: |
Compress-Archive -Path ./output/Api/* -DestinationPath ./output/Api.zip
# Note: This workflow assumes Windows-based deployment.
# For other platforms, you might need to:
# 1. Change the runner (e.g., ubuntu-latest for Linux)
# 2. Modify the build commands (e.g., use bash scripts instead of PowerShell)
# 3. Adjust the artifact packaging (e.g., use tar for Linux)
# 4. Update the deployment steps in your CD workflow