-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-docker-server-launcher.yml
More file actions
46 lines (39 loc) · 1.24 KB
/
build-docker-server-launcher.yml
File metadata and controls
46 lines (39 loc) · 1.24 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
name: Build Docker Server Launcher
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: windows-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Set up .NET SDK
- name: Set up .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x # Replace with the desired .NET version
# Step 3: Create a temporary project to compile the .cs file
- name: Create Temporary Project
run: |
mkdir temp
dotnet new console --output temp --name docker-server-launcher
mv ./docker-server-launcher.cs ./temp/Program.cs
# Step 4: Compile to a self-contained Windows executable
- name: Build Executable
run: |
dotnet publish ./temp/docker-server-launcher.csproj `
-r win-x64 `
--self-contained true `
/p:OutputType=WinExe `
/p:Configuration=Release `
-o ./output
# Step 5: Archive the executable as a repository artifact
- name: Archive Build Output
uses: actions/upload-artifact@v3
with:
name: vanderstack-docker-server
path: ./output