Skip to content

Commit f8b3b56

Browse files
committed
Feat#: add native build workflow
1 parent 75dd3ad commit f8b3b56

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
name: 'Build and release NuGet package'
22

33
on:
4+
push:
45
release:
56
types:
67
- published
78

89
jobs:
10+
build-native:
11+
name: 'Build native library'
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: 'Checkout repo'
16+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
17+
18+
- name: 'Install msbuild'
19+
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3
20+
21+
- name: 'Build project'
22+
run: msbuild Native\ApplicationLoopback.vcxproj
23+
924
build-publish:
1025
name: 'Build and push NuGet'
1126
runs-on: ubuntu-latest
1227

28+
needs:
29+
- build-native
30+
1331
env:
14-
IS_RELEASE: true
32+
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'published' }}
1533

1634
steps:
17-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
35+
- name: 'Checkout repo'
36+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1837

1938
- name: 'Build NuGet'
2039
uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build@606ac289d701be7b7d90e5ff8647dedf57d6d755 # main
@@ -23,7 +42,8 @@ jobs:
2342
dotnet-project-path: 'ApplicationLoopback.NET/ApplicationLoopback.NET/ApplicationLoopback.NET.csproj'
2443
dotnet-build-type: 'pack'
2544

26-
- name: 'Build and push NuGet'
45+
- name: 'Push nuget'
46+
if: ${{ env.IS_RELEASE == 'true' }}
2747
uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build-push-nuget@606ac289d701be7b7d90e5ff8647dedf57d6d755 # main
2848
with:
2949
dotnet-nuget-auth-token: ${{ secrets.NUGET_TOKEN }}

0 commit comments

Comments
 (0)