-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.87 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
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: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RuntimeIdentifier }}
path: ${{ env.ProjectName }}/bin/Release/net7.0/${{ env.RuntimeIdentifier }}/publish/**/*
env:
RuntimeIdentifier: ${{ matrix.runtimeIdentifier }}