Skip to content

Commit ecbe1b3

Browse files
committed
GH actions
1 parent 7e5a881 commit ecbe1b3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
name: Build Header Hero
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
rid: [win-x64, osx-arm64, linux-x64]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Install .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 9.0.x
26+
27+
- name: Restore
28+
working-directory: header_hero
29+
run: dotnet restore
30+
31+
- name: Publish ${{ matrix.rid }}
32+
working-directory: header_hero
33+
run: |
34+
dotnet publish \
35+
-c Release \
36+
-r ${{ matrix.rid }} \
37+
--self-contained true \
38+
/p:PublishSingleFile=true \
39+
/p:PublishTrimmed=true \
40+
/p:TrimMode=link \
41+
-o ../out/${{ matrix.rid }}
42+
43+
- name: Upload artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: HeaderHero-${{ matrix.rid }}
47+
path: out/${{ matrix.rid }}

0 commit comments

Comments
 (0)