JUST IN COSE #240
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: macOS Build CI | |
# Controls when the workflow will run | |
on: [push, pull_request] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Do it | |
uses: actions/checkout@v2 | |
# - name: first, begin caching stuffs | |
# uses: actions/cache@v2.1.7 | |
# id: cache-stuff | |
# with: | |
# path: | | |
# ~/work/Kaded-fnf-mods/Kaded-fnf-mods/export/ | |
# ~/hostedtoolcache/haxe/ | |
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Just do it | |
uses: krdlab/setup-haxe@v1.1.6 | |
with: | |
haxe-version: 4.3.2 | |
- name: Make your dreams come true | |
# if: steps.cache-stuff.outputs.cache-hit != 'true' | |
run: | | |
haxe -version | |
haxelib setup hmm | |
haxelib install Console.hx | |
echo "new Psych's found-way of auto install all libraries" | |
echo 'https://github.com/ShadowMario/FNF-PsychEngine/blob/main/hmm.json' | |
haxelib install hmm | |
haxelib run hmm install | |
echo 'you should have all done.' | |
haxelib run lime setup flixel -y | |
haxelib run lime setup -y | |
haxelib run lime setup sscript -y | |
haxelib run lime rebuild linc_luajit mac | |
haxelib run lime rebuild extension-webm mac | |
haxelib run lime rebuild systools mac | |
haxelib run lime rebuild yagp mac | |
haxelib list | |
ls | |
pwd | |
ls .. | |
pwd .. | |
ls ../.. | |
pwd ../.. | |
# - name: if there is cache still then just update everything | |
# if: steps.cache-stuff.outputs.cache-hit == 'true' | |
# run: | | |
# haxe -version | |
# haxelib update --always | |
# haxelib run lime setup flixel -y | |
# haxelib run lime setup -y | |
# haxelib run lime rebuild extension-webm linux | |
# haxelib run lime rebuild systools linux | |
# haxelib run lime rebuild yagp linux | |
# haxelib list | |
- name: Obtain macOS binaries for stuffs like luajit | |
run: | | |
wget https://github.com/nebulazorua/linc_luajit/raw/master/lib/lua/lib/Mac/libluajit-5.1.a | |
mkdir -p /Users/runner/hostedtoolcache/haxe/4.3.2/x64/lib/linc_luajit/lib/lua/lib/Mac/ | |
mv ./libluajit-5.1.a /Users/runner/hostedtoolcache/haxe/4.3.2/x64/lib/linc_luajit/lib/lua/lib/Mac/ | |
- name: Obtain GameJolt empty key | |
run: | | |
wget https://gist.github.com/JOELwindows7/ba79db473ab5e4765293fb19c62240cb/raw/d5fc74359ec9ae272003c5d715d04b4dbbd7810d/GJkeys.hx | |
mv ./GJkeys.hx /Users/runner/work/Kaded-fnf-mods/Kaded-fnf-mods/source/GJKeys.hx | |
- name: Oh peck, I can't believe you've done this | |
run: | | |
wget -q -O butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default | |
unzip ./butler.zip | |
mv ./butler /Users/runner/work | |
ls | |
pwd | |
- name: build macOS now! | |
run: | | |
haxelib run lime build mac -final | |
- uses: actions/upload-artifact@v2.2.4 | |
with: | |
name: macOS Build | |
path: export/release/macos/bin | |
- name: Manually push to Itch macOS because that Action container only support Linux wtf bro | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }} | |
run: | | |
hdiutil create /Users/runner/work/temp.dmg -ov -volname "last-funkin-moments-macOS" -fs HFS+ -srcfolder "/Users/runner/work/Kaded-fnf-mods/kaded-fnf-mods/export/release/macos/bin" | |
ls | |
pwd | |
hdiutil convert /Users/runner/work/temp.dmg -format UDZO -o last-funkin-moments-macOS.dmg | |
/Users/runner/work/butler push last-funkin-moments-macOS.dmg joelwindows7/last-funkin-moments:macOS-GHAction | |
#- name: Yo, release now | |
# # uses: softprops/action-gh-release@v0.1.13 | |
# # if: startsWith(github.ref, 'refs/tags/') | |
# # https://github.com/marketplace/actions/upload-files-to-a-github-release | |
# uses: svenstaro/upload-release-action@2.3.0 | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file: export/release/macos/bin | |
# asset_name: macOS Build | |
# tag: ${{ github.ref }} | |
# overwrite: true | |
# # body: "This is my release text" |