|
19 | 19 | - uses: krdlab/setup-haxe@v1
|
20 | 20 | with:
|
21 | 21 | haxe-version: 4.2.4
|
| 22 | + |
| 23 | + - name: Get last Action build |
| 24 | + uses: actions/cache@v3 |
| 25 | + with: |
| 26 | + # not caching the bin folder to prevent asset duplication and stuff like that |
| 27 | + key: cache-build-windows |
| 28 | + path: | |
| 29 | + .haxelib/ |
| 30 | + export/release/windows/haxe/ |
| 31 | + export/release/windows/obj/ |
| 32 | + restore-keys: | |
| 33 | + cache-build-windows |
22 | 34 | # Runs a set of commands using the runners shell
|
23 | 35 | - name: script run line haha
|
24 | 36 | run: |
|
|
37 | 49 | haxelib install flixel-addons
|
38 | 50 | haxelib install flixel-ui
|
39 | 51 | haxelib install hscript
|
40 |
| - haxelib install hxCodec |
| 52 | + haxelib git hxCodec https://github.com/polybiusproxy/hxCodec |
41 | 53 | haxelib install flixel-addons
|
42 | 54 | haxelib git faxe https://github.com/uhrobots/faxe
|
43 | 55 | haxelib git polymod https://github.com/BoloVEVO/polymod.git
|
|
57 | 69 | with:
|
58 | 70 | name: Windows Build
|
59 | 71 | path: export/release/windows/bin
|
| 72 | + |
| 73 | + - name: Clear current Action Cache |
| 74 | + uses: actions/github-script@v6 |
| 75 | + with: |
| 76 | + script: | |
| 77 | + const caches = await github.rest.actions.getActionsCacheList({ |
| 78 | + owner: context.repo.owner, |
| 79 | + repo: context.repo.repo, |
| 80 | + }) |
| 81 | + for (const cache of caches.data.actions_caches) { |
| 82 | + if (cache.key == "cache-build-windows") { |
| 83 | + console.log('Clearing ' + cache.key + '...') |
| 84 | + await github.rest.actions.deleteActionsCacheById({ |
| 85 | + owner: context.repo.owner, |
| 86 | + repo: context.repo.repo, |
| 87 | + cache_id: cache.id, |
| 88 | + }) |
| 89 | + console.log("Cache cleared.") |
| 90 | + } |
| 91 | + } |
| 92 | +
|
| 93 | + - name: Caching new Action |
| 94 | + uses: actions/cache@v3 |
| 95 | + with: |
| 96 | + # caching again since for some reason it doesnt work with the first post cache shit |
| 97 | + key: cache-build-windows |
| 98 | + path: | |
| 99 | + .haxelib/ |
| 100 | + export/release/windows/haxe/ |
| 101 | + export/release/windows/obj/ |
| 102 | + restore-keys: | |
| 103 | + cache-build-windows |
0 commit comments