forked from hrmorley34/papyruscs
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (57 loc) · 1.93 KB
/
publish.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
name: Publish
# on: [push, pull_request]
env:
DOTNET_VERSION: "3.1.x" # The .NET SDK version to use
jobs:
test:
runs-on: ubuntu-latest
env:
ARTIFACT_BENCHMARK: "artifact/benchmark"
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
# - name: Build
# run: |
# dotnet build PapyrusCs -c Release --no-restore
- name: Test
run: |
dotnet test --no-restore --verbosity normal
- name: Prepare artifacts
run: |
mkdir -p "${{ env.ARTIFACT_BENCHMARK }}"
cp "MapLoader.NUnitTests/bin/Debug/netcoreapp3.1/benchmark.png" "${{ env.ARTIFACT_BENCHMARK }}/benchmark.png"
cp "MapLoader.NUnitTests/bin/Debug/netcoreapp3.1/benchmark/Benchmark.png" "${{ env.ARTIFACT_BENCHMARK }}/benchmark-original.png"
- name: Upload benchmark
uses: actions/upload-artifact@v2
with:
name: "benchmark"
path: "${{ env.ARTIFACT_BENCHMARK }}/**/*"
publish:
runs-on: ubuntu-latest
strategy:
matrix:
runtime: [linux-x64, win-x64]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
# - name: Build
# run: |
# dotnet build PapyrusCs -c Release --no-restore
- name: Build ${{ matrix.runtime }}
run: |
dotnet publish PapyrusCs -c Release -o build/${{ matrix.runtime }} -r ${{ matrix.runtime }} --self-contained true
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: "papyruscs-${{ matrix.runtime }}"
path: "build/${{ matrix.runtime }}/**/*"