-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.79 KB
/
buildupmpackages.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build UPM packages for platforms
on:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
# Example flow
jobs:
# Check Unity version requird by the package
validate-environment:
name: Get Unity Version from UPM package
uses: realitycollective/reusableworkflows/.github/workflows/getunityversionfrompackage.yml@v2
with:
build-host: windows
# Validate output parameters from the Validate-Environment job
Check-Params-unityversion:
needs: validate-environment
uses: realitycollective/reusableworkflows/.github/workflows/testparams.yml@v2
name: Test output from Validate
with:
build-host: windows
teststring: ${{ needs.validate-environment.outputs.unityversion }}
# Check Unity Hub and Editor Environment
Setup-Unity:
name: Validate Unity Install
needs: [Check-Params-unityversion, validate-environment]
uses: realitycollective/reusableworkflows/.github/workflows/validateunityinstall.yml@v2
with:
build-target: windows
unityversion: ${{ needs.validate-environment.outputs.unityversion }}
# Validate unityeditorversion output parameter from the Setup-Unity job
Check-Params-editorversion:
needs: [Setup-Unity]
uses: realitycollective/reusableworkflows/.github/workflows/testparams.yml@v2
name: Test editor version from Setup-Unity
with:
build-host: windows
teststring: ${{ needs.Setup-Unity.outputs.unityeditorversion }}
# Validate unityeditorinstalled output parameter from the Setup-Unity job
Check-Params-editorinstalled:
needs: [Setup-Unity]
uses: realitycollective/reusableworkflows/.github/workflows/testparams.yml@v2
name: Test editor installed from Setup-Unity
with:
build-host: windows
teststring: ${{ needs.Setup-Unity.outputs.unityeditorinstalled }}
# Run Unity unit tests defined in the package
Run-Unit-Tests:
name: Run Unity Unit Tests
needs: [Check-Params-editorversion, Setup-Unity]
uses: realitycollective/reusableworkflows/.github/workflows/rununityUPMbuild.yml@v2
with:
unityversion: ${{ needs.Setup-Unity.outputs.unityeditorversion }}
dependencies: '{"dependancyname": "dependency repository"}'
# Check inside yml file for instructions on dependencies
secrets: inherit
# Publish preview package if successful, bumps version of package
run-upm:
name: Publish UPM Package
needs: Run-Unit-Tests
uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2
with:
build-host: ubuntu-latest
build-type: pre-release
# options:
# - major
# - minor
# - patch
# - patch-release
# - pre-release
# - build