-
Notifications
You must be signed in to change notification settings - Fork 40
113 lines (92 loc) · 5.32 KB
/
iterate.yaml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build For Iterating
on:
workflow_dispatch:
push:
env:
packageName: "com.llealloo.audiolink"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version
id: version
uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
with:
path: "Packages/${{env.packageName}}/package.json"
prop_path: "version"
- run: echo ${{steps.version.outputs.prop}}
- name: Set Environment Variables
run: |
echo "zipFile=${{ env.packageName }}-${{ steps.version.outputs.prop }}".zip >> $GITHUB_ENV
echo "unityPackage=${{ env.packageName }}-${{ steps.version.outputs.prop }}.unitypackage" >> $GITHUB_ENV
echo "minimalUnityPackage=AudioLink_${{ steps.version.outputs.prop }}_minimal.unitypackage" >> $GITHUB_ENV
- name: Copy root files
run: |
cp LICENSE Packages/${{ env.packageName }}/
cp README.md Packages/${{ env.packageName }}/
cp CHANGELOG.md Packages/${{ env.packageName }}/
cp .github/workflows/StandaloneMetadata/LICENSE.meta Packages/${{ env.packageName }}/
cp .github/workflows/StandaloneMetadata/README.md.meta Packages/${{ env.packageName }}/
cp .github/workflows/StandaloneMetadata/CHANGELOG.md.meta Packages/${{ env.packageName }}/
mkdir -p Packages/${{ env.packageName }}/Documentation~/
cp -R Docs/* Packages/${{ env.packageName }}/Documentation~/
- name: Create zip
uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657
with:
type: "zip"
directory: "Packages/${{env.packageName}}/"
filename: "../../${{env.zipFile}}"
- run: find "Packages/${{env.packageName}}/" -name \*.meta >> metaList
- name: Create full UnityPackage
uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
with:
package-path: ${{ env.unityPackage }}
include-files: metaList
- name: Make minimal meta list
run: |
sed -i '1s/^/#define AUDIOLINK_STANDALONE\n/' "Packages/${{env.packageName}}/Editor/Scripts/AudioLinkAssetManager.cs"
cp ".github/workflows/StandaloneMetadata/package.json" "Packages/${{env.packageName}}/package.json"
cp ".github/workflows/StandaloneMetadata/AudioLink.asmdef" "Packages/${{env.packageName}}/Runtime/AudioLink.asmdef"
cp ".github/workflows/StandaloneMetadata/AudioLink.Editor.asmdef" "Packages/${{env.packageName}}/Editor/Audiolink.Editor.asmdef"
echo "Packages/${{env.packageName}}/package.json.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/AudioLink.asmdef.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Editor/Audiolink.Editor.asmdef.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/LICENSE.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/README.md.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/CHANGELOG.md.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/AudioLink.prefab.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/AudioLinkAvatar.prefab.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/AudioLinkController.prefab.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/AudioLinkControllerV0.prefab.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/VERSION.txt.meta" >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/Scripts.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Runtime/Scripts/" -name \*.meta >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/RenderTextures.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Runtime/RenderTextures/" -name \*.meta >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/Shaders.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Runtime/Shaders/" -name \*.meta >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/Materials.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Runtime/Materials/" -name \*.meta >> minimalMetaList
echo "Packages/${{env.packageName}}/Runtime/Resources.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Runtime/Resources/" -name \*.meta >> minimalMetaList
echo "Packages/${{env.packageName}}/Editor/Scripts.meta" >> minimalMetaList
find "Packages/${{env.packageName}}/Editor/Scripts/" -name \*.meta >> minimalMetaList
- name: Create minimal UnityPackage
uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
with:
package-path: ${{ env.minimalUnityPackage }}
include-files: minimalMetaList
- uses: actions/upload-artifact@v3
with:
name: Zip release
path: ${{ env.zipFile }}
- uses: actions/upload-artifact@v3
with:
name: UnityPackage release
path: ${{ env.unityPackage }}
- uses: actions/upload-artifact@v3
with:
name: Minimal UnityPackage release
path: ${{ env.minimalUnityPackage }}