-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.15 KB
/
main.yml
File metadata and controls
78 lines (67 loc) · 2.15 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
name: Build, Test and Deploy 💻
on:
push:
branches:
- based
paths-ignore:
- '.github/README.md'
- 'presentation/index.md'
pull_request:
paths-ignore:
- '.github/README.md'
- 'presentation/**'
jobs:
buildForAllSupportedPlatforms:
name: Build, Test and Deploy for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # if one build fails, other platforms will still be built
matrix:
targetPlatform:
- StandaloneWindows64
- WebGL
- StandaloneOSX
steps:
# Fetch Files
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
# Cache Unity Library Folder
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
# Test playmode and editmode
- uses: game-ci/unity-test-runner@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
githubToken: ${{ secrets.GITHUB_TOKEN }} # used to view test results
# Upload Test results as artifacts
- uses: actions/upload-artifact@v2
if: always()
with:
name: Test results
path: artifacts
# Build Unity Game
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
# Upload Build as Artifacts
#- uses: actions/upload-artifact@v2
# with:
# name: Build-${{ matrix.targetPlatform }}
# path: build/${{ matrix.targetPlatform }}
# Publish to Itch.IO
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: ${{ matrix.targetPlatform }}
ITCH_GAME: deployexample
ITCH_USER: Macawls
PACKAGE: build/${{ matrix.targetPlatform }}