-
Notifications
You must be signed in to change notification settings - Fork 43
70 lines (61 loc) · 1.93 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
62
63
64
65
66
67
68
69
70
name: Build Windows Player
on:
push:
branches:
- master
workflow_dispatch:
jobs:
buildWindowsPlayer:
name: build Windows Player
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildName:
- UmaViewer
projectPath:
- ./
unityVersion:
- 2020.3.24f1
targetPlatform:
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
buildName: ${{ matrix.buildName }}
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v2
with:
name: Build
path: build
- name: Zip Binary
run: zip -r UmaViewer_${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: AutoBuild_${{ github.event.head_commit.id }}
release_name: UmaViewer_${{ github.event.head_commit.id }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./UmaViewer_${{ matrix.targetPlatform }}.zip
asset_name: UmaViewer.zip
asset_content_type: application/zip