-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 3.07 KB
/
unity.yml
File metadata and controls
99 lines (87 loc) · 3.07 KB
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
89
90
91
92
93
94
95
96
97
98
99
name: Build and Release Unity WebGL
on:
push:
tags:
- v*
jobs:
unity:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: false
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Unity Dependencies
uses: actions/cache@v4
with:
path: ./desdemona/Library
key: Library-desdemona-WebGL
restore-keys: |
Library-desdemona-
Library-
- name: Build Unity project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
projectPath: desdemona
buildMethod: Commands.Builder.Build
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Upload WebGL data
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: desdemona/Builds/WebGL/Build/WebGL.data.unityweb
asset_name: WebGL.data.unityweb
asset_content_type: application/gzip
- name: Upload WebGL framework
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: desdemona/Builds/WebGL/Build/WebGL.framework.js.unityweb
asset_name: WebGL.framework.js.unityweb
asset_content_type: application/gzip
- name: Upload WebGL wasm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: desdemona/Builds/WebGL/Build/WebGL.wasm.unityweb
asset_name: WebGL.wasm.unityweb
asset_content_type: application/gzip
- name: Upload Unity loader script
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: desdemona/Builds/WebGL/Build/WebGL.loader.js
asset_name: WebGL.loader.js
asset_content_type: application/javascript