mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-11 14:48:02 +00:00
windows caching maybe?
This commit is contained in:
parent
939171cb1d
commit
007902868b
31
.github/workflows/build-shit.yml
vendored
31
.github/workflows/build-shit.yml
vendored
|
@ -1,11 +1,7 @@
|
|||
name: build-upload
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 17 * * *'
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
check_date:
|
||||
|
@ -54,7 +50,8 @@ jobs:
|
|||
.haxelib/
|
||||
export/debug/windows/haxe/
|
||||
export/debug/windows/obj/
|
||||
|
||||
restore-keys: |
|
||||
cache-build-windows
|
||||
- uses: ./.github/actions/setup-haxeshit
|
||||
- name: Build game
|
||||
run: |
|
||||
|
@ -65,11 +62,33 @@ jobs:
|
|||
butler-key: ${{ secrets.BUTLER_API_KEY}}
|
||||
build-dir: export/debug/windows/bin
|
||||
target: win
|
||||
- name: Clearing already existing cache
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const caches = await github.rest.actions.getActionsCacheList({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
})
|
||||
for (const cache of caches.data.actions_caches) {
|
||||
if (cache.key == "cache-build-windows") {
|
||||
console.log('Clearing ' + cache.key + '...')
|
||||
await github.rest.actions.deleteActionsCacheById({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
cache_id: cache.id,
|
||||
})
|
||||
console.log("Cache cleared.")
|
||||
}
|
||||
}
|
||||
- name: Uploading new cache
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
key: ${{ steps.cache-windows-shit.outputs.cache-primary-key }}
|
||||
# caching again since for some reason it doesnt work with the first post cache shit
|
||||
key: cache-build-windows
|
||||
path: |
|
||||
.haxelib/
|
||||
export/debug/windows/haxe/
|
||||
export/debug/windows/obj/
|
||||
restore-keys: |
|
||||
cache-build-windows
|
||||
|
|
Loading…
Reference in a new issue