-
Notifications
You must be signed in to change notification settings - Fork 5
97 lines (85 loc) · 2.71 KB
/
net-build-client-gen.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: '[net] Build client-gen-dotnet'
on:
push:
branches:
- master
paths:
- '.github/workflows/net-build-client-gen.yml'
- 'net/rs/**'
pull_request:
paths:
- '.github/workflows/net-build-client-gen.yml'
- 'net/rs/**'
jobs:
win-x64:
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: cargo build --manifest-path net/rs/Cargo.toml --release
- uses: actions/upload-artifact@v4
with:
name: win-x64
path: ./net/rs/target/release/sails_net_client_gen.dll
retention-days: 1
overwrite: true
linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo build --manifest-path net/rs/Cargo.toml --release
- uses: actions/upload-artifact@v4
with:
name: linux-x64
path: ./net/rs/target/release/libsails_net_client_gen.so
retention-days: 1
overwrite: true
osx-x64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: rustup target add x86_64-apple-darwin
- run: cargo build --manifest-path net/rs/Cargo.toml --release --target x86_64-apple-darwin
- uses: actions/upload-artifact@v4
with:
name: osx-x64
path: ./net/rs/target/x86_64-apple-darwin/release/libsails_net_client_gen.dylib
retention-days: 1
overwrite: true
osx-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: rustup target add aarch64-apple-darwin
- run: cargo build --manifest-path net/rs/Cargo.toml --release --target aarch64-apple-darwin
- uses: actions/upload-artifact@v4
with:
name: osx-arm64
path: ./net/rs/target/aarch64-apple-darwin/release/libsails_net_client_gen.dylib
retention-days: 1
overwrite: true
build-nuget-package:
needs:
- win-x64
- linux-x64
- osx-x64
- osx-arm64
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download native libraries
uses: actions/download-artifact@v4
with:
path: native-libraries
- name: Build
run: dotnet build ./net/src/Sails.ClientGenerator/ -c Release -p:LibraryRoot=${{ github.workspace }}/native-libraries -p:Version=0.6.3-rc
- name: Pack
run: dotnet pack ./net/src/Sails.ClientGenerator/ -c Release --no-build -p:Version=0.6.3-rc -o ./publish
- name: Upload NuGet artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./publish/*.nupkg
retention-days: 1
overwrite: true