-
Notifications
You must be signed in to change notification settings - Fork 222
88 lines (79 loc) · 2.76 KB
/
publish_pr.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
name: Publish PR
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build_gui:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
configuration: [Debug]
bundled: [false]
singlefile: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
dotnet build UndertaleModTool --no-restore
dotnet build UndertaleModToolUpdater --no-restore
- name: Publish ${{ matrix.os }} GUI
run: |
dotnet publish UndertaleModTool -c ${{ matrix.configuration }} -r win-x64 --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=${{ matrix.singlefile }} --output ${{ matrix.os }}
dotnet publish UndertaleModToolUpdater -c ${{ matrix.configuration }} -r win-x64 --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=false --output ${{ matrix.os }}/Updater
- name: Copy external files
run: |
cp ./README.md ./${{ matrix.os }}
cp ./SCRIPTS.md ./${{ matrix.os }}
cp ./LICENSE.txt ./${{ matrix.os }}
- name: Upload ${{ matrix.os }} GUI
uses: actions/upload-artifact@v2
with:
name: GUI-${{ matrix.os }}-isBundled-${{ matrix.bundled }}-isSingleFile-${{ matrix.singlefile }}
path: ${{ matrix.os }}
publish_cli:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
configuration: [Debug]
bundled: [false]
include:
- os: ubuntu-latest
rid: linux-x64
- os: macOS-latest
rid: osx-x64
- os: windows-latest
rid: win-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore UndertaleModCli
- name: Build
run: dotnet build UndertaleModCli --no-restore
- name: Publish ${{ matrix.os }} CLI
run: dotnet publish UndertaleModCli -c ${{ matrix.configuration }} -r ${{ matrix.rid }} --self-contained ${{ matrix.bundled }} -p:PublishSingleFile=false --output CLI-${{ matrix.os }}
- name: Copy external files
run: |
cp ./README.md ./CLI-${{ matrix.os }}/
cp ./LICENSE.txt ./CLI-${{ matrix.os }}/
- name: Upload ${{ matrix.os }} CLI
uses: actions/upload-artifact@v2
with:
name: CLI-${{ matrix.os }}-isBundled-${{ matrix.bundled }}
path: CLI-${{ matrix.os }}