Skip to content

Commit 4b34f53

Browse files
Merge pull request #35 from Grimeh/main
Add github action for automatic & manual builds
2 parents fbb0f72 + 2a4489c commit 4b34f53

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/.build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build UnityDataTool
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: 'Build environment'
8+
default: 'release'
9+
required: true
10+
type: choice
11+
options:
12+
- debug
13+
- release
14+
push:
15+
branches:
16+
- main
17+
18+
env:
19+
environment: ${{ inputs.environment || 'release' }}
20+
21+
jobs:
22+
build:
23+
strategy:
24+
matrix:
25+
os: [windows, macos]
26+
arch: [x64, arm64]
27+
exclude:
28+
- os: windows
29+
arch: arm64
30+
- os: macos
31+
arch: x64
32+
33+
runs-on: ${{ matrix.os }}-latest
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
39+
- name: Setup .NET
40+
uses: actions/setup-dotnet@v4
41+
with:
42+
dotnet-version: 9.0.x
43+
44+
- name: Publish UnityDataTool (${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }})
45+
run: >
46+
dotnet publish UnityDataTool
47+
-c ${{ env.environment }}
48+
-a ${{ matrix.arch }}
49+
-p:PublishSingleFile=true
50+
-p:UseAppHost=true
51+
-o publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}
52+
53+
- name: Upload artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: UnityDataTool-${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }}
57+
path: publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[Tt]emp/
66
[Ll]og/
77
[Ll]ogs/
8+
[Pp]ublish/
89

910
**/*.csproj.user
1011
**/*.suo

0 commit comments

Comments
 (0)