-
-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (45 loc) · 1.65 KB
/
build-native-tools.yml
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
name: build-native-tools
on:
workflow_dispatch:
push:
paths:
- "implement/native-tools/**"
- ".github/workflows/build-native-tools.yml"
jobs:
build:
strategy:
fail-fast: false
matrix:
environment: [ubuntu-24.04, windows-2022, macos-13]
include:
- environment: ubuntu-24.04
publish-runtime-id: linux-x64
- environment: windows-2022
publish-runtime-id: win-x64
- environment: macos-13
publish-runtime-id: osx-x64
runs-on: ${{ matrix.environment }}
steps:
- name: Avoid git mutating files on checkout
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.404'
- name: Try use dotnet
run: dotnet --info
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
run: dotnet clean ./implement/native-tools/native-tools.csproj && dotnet nuget locals all --clear
- name: dotnet publish
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --output ./dotnet-build ./implement/native-tools
- name: Copy artifacts to publish
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "./publish";
Get-ChildItem -Path "./dotnet-build/" -Filter "native-tools*" | ForEach-Object { Copy-Item -Path $_.FullName -Destination "./publish/" }
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: native-tools-bin-${{ github.sha }}-${{ matrix.publish-runtime-id }}
path: ./publish