This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (54 loc) · 1.89 KB
/
build-dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET cross-platform builds for Windows, Linux and MacOS
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore TileBakeTool/TileBakeTool.csproj
#Build for platform
- name: Build Release
if: runner.os == 'Windows'
run: |
dotnet publish TileBakeTool/TileBakeTool.csproj --configuration Release --output ./windows-publish --verbosity normal --self-contained true
- name: Build Release
if: runner.os == 'Linux'
run: |
dotnet publish TileBakeTool/TileBakeTool.csproj --configuration Release --output ./linux-publish --verbosity normal --self-contained true
- name: Build Release
if: runner.os == 'macOS'
run: |
dotnet publish TileBakeTool/TileBakeTool.csproj --configuration Release --output ./macos-publish --verbosity normal --self-contained true
#Publish artifact
- name: Publish Windows Artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: windows-artifacts
path: ./windows-publish
- name: Publish Linux Artifacts
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: linux-artifacts
path: ./linux-publish
- name: Publish macOS Artifacts
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
name: macos-artifacts
path: ./macos-publish