-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (60 loc) · 2.33 KB
/
build.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
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
runtimeIdentifier: ["win7-x64", "linux-x64", "osx-arm64", "osx-x64"]
runs-on: ubuntu-latest
env:
ProjectName: BAKKA_Editor.Desktop
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Publish the application
run: dotnet publish ${{ env.ProjectName }} --sc -r ${{ env.RuntimeIdentifier }} -c Release
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Copy bass libraries (Linux)
run: cp ${{ env.ProjectName }}/lib/${{ env.RuntimeIdentifier }}/* ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish
if: ${{ contains(env.RuntimeIdentifier, 'linux') }}
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Copy bass libraries (Windows)
run: cp ${{ env.ProjectName }}/lib/win-x64/* ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish
if: ${{ !contains(env.RuntimeIdentifier, 'win') }}
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Copy bass libraries (macOS)
run: cp ${{ env.ProjectName }}/lib/darwin/* ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish
if: ${{ contains(env.RuntimeIdentifier, 'osx') }}
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Mark binary as executable
run: chmod +x ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish/${{ env.ProjectName }}
if: ${{ !contains(env.RuntimeIdentifier, 'win') }}
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Create zip archive
run: zip -r ${{ env.RuntimeIdentifier }}.zip ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RuntimeIdentifier }}
path: ${{ env.RuntimeIdentifier }}.zip
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}