Merge pull request #4 from Joalor64GH/main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Moon4K-Win | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
buildWindows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.6 | |
- name: Restore Previous Cache | |
id: cache-build-restore | |
uses: actions/cache/restore@main | |
with: | |
path: | | |
.haxelib/ | |
export/debug/windows/haxe/ | |
export/debug/windows/obj/ | |
key: cache-windows-debug | |
- name: Set Cache Status | |
id: cache-status | |
run: echo CACHE_HIT=${{ steps.cache-build-restore.outputs.cache-hit }} | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 | |
shell: powershell | |
- name: Install Haxelib | |
run: haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main | |
- name: Create Version Tag | |
run: echo "${{github.run_id}}" > VERSION | |
- name: Compile | |
run: haxelib run lime build windows -debug | |
- name: Clear Previous Cache | |
uses: actions/github-script@main | |
with: | |
script: await require('./actions/cache/clear-cache.js')({github, context}, 'cache-windows-debug'); | |
- name: Save Current Cache | |
uses: actions/cache@main | |
with: | |
key: cache-windows-debug | |
path: | | |
.haxelib/ | |
export/debug/windows/haxe/ | |
export/debug/windows/obj/ | |
restore-keys: | | |
cache-windows-debug | |
- name: Publish Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: Moon4K-Win-Release | |
path: export/debug/windows/bin |