Skip to content

Commit d071d26

Browse files
authored
GitHub Actions
1 parent 18c08b2 commit d071d26

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build
2+
3+
on:
4+
push: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
project: [IRDKit]
13+
runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
14+
framework: [net9.0]
15+
conf: [Release]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: 9.0.x
24+
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
28+
- name: Build
29+
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ 'Release -p:DebugType=None -p:DebugSymbols=false'}} --self-contained true}}
30+
31+
- name: Archive build
32+
run: |
33+
cd ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/
34+
zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./
35+
36+
- name: Upload build
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}
40+
path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip

0 commit comments

Comments
 (0)