mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-25 06:36:43 +00:00
7644ce1019
* first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * 🥺 * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * 🥺 * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * 🥺 * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * 🥺 * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
125 lines
3.5 KiB
YAML
125 lines
3.5 KiB
YAML
name: upload-itch
|
|
description: "installs Butler, and uploads to itch.io!"
|
|
|
|
inputs:
|
|
butler-key:
|
|
description: "Butler API secret key"
|
|
required: true
|
|
itch-repo:
|
|
description: "Where to upload the game to"
|
|
required: true
|
|
default: "ninja-muffin24/funkin-secret"
|
|
build-dir:
|
|
description: "Directory of the game build"
|
|
required: false
|
|
target:
|
|
description: "Target (html5, windows, linux, macos)"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
|
|
# RUNNER_OS = Windows | macOS | Linux
|
|
# TARGET_BUILD = windows | macos | linux
|
|
# TARGET_ITCH = win | macos | linux
|
|
# TARGET_BUTLER_DOWNLOAD = windows-amd64 | darwin-amd64 | linux-amd64
|
|
- name: Setup variables
|
|
shell: bash
|
|
run: |
|
|
TARGET_OS=${{ inputs.target }}
|
|
RUNNER=${RUNNER_OS@L}
|
|
TARGET=${TARGET_OS@L}
|
|
case "$TARGET" in
|
|
"windows")
|
|
TARGET_ITCH=win
|
|
;;
|
|
*)
|
|
TARGET_ITCH=$TARGET
|
|
;;
|
|
esac
|
|
case "$RUNNER" in
|
|
"macos")
|
|
OS_NODE=darwin
|
|
;;
|
|
*)
|
|
OS_NODE=$RUNNER
|
|
;;
|
|
esac
|
|
BUTLER_PATH=$RUNNER_TEMP/butler
|
|
|
|
echo BUILD_DIR="export/release/$TARGET/bin" >> "$GITHUB_ENV"
|
|
echo ITCH_TAG=${{ inputs.itch-repo }}:$TARGET_ITCH-$GITHUB_REF_NAME >> "$GITHUB_ENV"
|
|
echo OS_AND_ARCH=$OS_NODE-amd64 >> "$GITHUB_ENV"
|
|
echo BUTLER_API_KEY=${{ inputs.butler-key }} >> "$GITHUB_ENV"
|
|
echo BUTLER_INSTALL_PATH=$BUTLER_PATH >> "$GITHUB_ENV"
|
|
echo TIMER_BUTLER=$(date +%s) >> "$GITHUB_ENV"
|
|
echo TARGET_ITCH=$TARGET_ITCH >> "$GITHUB_ENV"
|
|
|
|
echo "$BUTLER_PATH" >> "$GITHUB_PATH"
|
|
|
|
- name: Get latest butler version
|
|
shell: bash
|
|
run: |
|
|
LATEST=$(curl -sfL https://broth.itch.ovh/butler/$OS_AND_ARCH/LATEST)
|
|
echo BUTLER_LATEST=$LATEST >> "$GITHUB_ENV"
|
|
|
|
command -v butler \
|
|
&& echo BUTLER_CURRENT=$(butler -V 2>&1 | cut -d ',' -f 1) >> "$GITHUB_ENV" \
|
|
|| echo BUTLER_CURRENT=none >> "$GITHUB_ENV"
|
|
|
|
- name: Try to get butler from cache
|
|
id: cache-butler
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ env.BUTLER_INSTALL_PATH }}
|
|
key: butler-${{ runner.os }}-${{ env.BUTLER_LATEST }}
|
|
|
|
- if: steps.cache-butler.outputs.cache-hit == 'true'
|
|
name: Make sure butler is executable
|
|
shell: bash
|
|
run: |
|
|
chmod +x $BUTLER_INSTALL_PATH/butler
|
|
|
|
- if: steps.cache-butler.outputs.cache-hit != 'true'
|
|
name: Install butler
|
|
shell: bash
|
|
run: |
|
|
mkdir -p $BUTLER_INSTALL_PATH
|
|
cd $BUTLER_INSTALL_PATH
|
|
|
|
curl -L -o butler.zip https://broth.itch.ovh/butler/$OS_AND_ARCH/LATEST/archive/default
|
|
unzip butler.zip
|
|
chmod +x butler
|
|
|
|
- name: Upload game to itch.io
|
|
shell: bash
|
|
run: |
|
|
echo "TIMER_UPLOAD=$(date +%s)" >> "$GITHUB_ENV"
|
|
butler login
|
|
butler push $BUILD_DIR $ITCH_TAG
|
|
echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV"
|
|
|
|
- name: Print debug info
|
|
shell: bash
|
|
run: |
|
|
cat << EOF
|
|
butler:
|
|
version: $(
|
|
if [[ "$BUTLER_CURRENT" == "$BUTLER_LATEST" ]]
|
|
then
|
|
echo $BUTLER_CURRENT
|
|
else
|
|
echo $BUTLER_CURRENT -> $BUTLER_LATEST
|
|
fi
|
|
)
|
|
install:
|
|
took: $(($TIMER_UPLOAD-$TIMER_BUTLER))s
|
|
upload:
|
|
tag: $TARGET_ITCH/$GITHUB_REF_NAME
|
|
took: $(($TIMER_DONE-$TIMER_UPLOAD))s
|
|
EOF
|
|
cat << EOF >> "$GITHUB_STEP_SUMMARY"
|
|
### open in launcher: [$TARGET_ITCH/$GITHUB_REF_NAME](https://run.funkin.me/$TARGET_ITCH/$GITHUB_REF_NAME)
|
|
EOF
|