From 3918abe8a12ba76ed580256f05ff86cce9aae8d9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 18 May 2022 13:27:56 -0400 Subject: [PATCH] ANOTHER REBASE CLEAN CLEAN revert commit lol? action seperating hehe directory fix? runs / compsite action fix shell bash fix? lol seperate out the butler/itchio stuff took out nasty env thingie in the action butler api key fix perhaps? lol target woops linux build easy? mac yolo test? moved all to one main github workflow, and better butler downloading rename the workflow lol better if statement maybe? oops fixed indentation lol! missing shell, im dumb!! mac fix and maybe even windows? hmm fix perhaps dont need the HMM setup actually? REBASE / SQUASH STUFF LOL windows linux butler installing? haxelib caching? cache fix lol? actual cache fix... lol ok i am getting trolled.... actual hashfile, woops hopefully cache fix, and no more "clean" builds added workflow dispatch too better workflow_dispatch thing? NO CACHE BULLSHIT ok actually maybe cache? idk some shit with syntax ok no more cache... just cache the haxelib stuff format fix teehee --- .github/actions/setup-haxeshit/action.yml | 22 ++++++++ .github/actions/upload-itch/action.yml | 44 ++++++++++++++++ .github/workflows/build-html5-onLinux.yml | 27 ---------- .github/workflows/build-shit.yml | 63 +++++++++++++++++++++++ 4 files changed, 129 insertions(+), 27 deletions(-) create mode 100644 .github/actions/setup-haxeshit/action.yml create mode 100644 .github/actions/upload-itch/action.yml delete mode 100644 .github/workflows/build-html5-onLinux.yml create mode 100644 .github/workflows/build-shit.yml diff --git a/.github/actions/setup-haxeshit/action.yml b/.github/actions/setup-haxeshit/action.yml new file mode 100644 index 000000000..b9ece9f23 --- /dev/null +++ b/.github/actions/setup-haxeshit/action.yml @@ -0,0 +1,22 @@ +name: setup-haxeshit +description: "sets up haxe shit, using HMM!" +runs: + using: "composite" + steps: + - uses: krdlab/setup-haxe@v1.1.6 + with: + haxe-version: 4.2.4 + - uses: actions/cache@v3 + with: + path: .haxelib/ + key: ${{ runner.os }}-${{ hashFiles('**/hmm.json') }} + - name: Config haxelib + run: | + haxelib config + shell: bash + - name: Installing Haxe lol + run: | + haxe -version + haxelib --global install hmm + haxelib --global run hmm install --quiet + shell: bash \ No newline at end of file diff --git a/.github/actions/upload-itch/action.yml b/.github/actions/upload-itch/action.yml new file mode 100644 index 000000000..5abc31b16 --- /dev/null +++ b/.github/actions/upload-itch/action.yml @@ -0,0 +1,44 @@ +name: upload-itch +description: "installs Butler, and uploads to itch.io!" +inputs: + butler-key: + description: "Butler API secret key" + required: true + build-dir: + description: "Directory of the game build" + required: true + target: + description: "Target (html5, win, linux, mac)" + required: true +runs: + using: "composite" + steps: + - name: Install butler Windows + if: runner.os == 'Windows' + run: | + curl -L -o butler.zip https://broth.itch.ovh/butler/windows-amd64/LATEST/archive/default + 7z x butler.zip + ./butler -v + shell: bash + - name: Install butler Mac + if: runner.os == 'macOS' + run: | + curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default + unzip butler.zip + ./butler -V + shell: bash + - name: Install butler Linux + if: runner.os == 'Linux' + run: | + curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default + unzip butler.zip + chmod +x butler + ./butler -V + shell: bash + - name: Upload game to itch.io + env: + BUTLER_API_KEY: ${{inputs.butler-key}} + run: | + ./butler login + ./butler push ${{inputs.build-dir}} ninja-muffin24/funkin-secret:${{inputs.target}}-${GITHUB_REF##*/} + shell: bash \ No newline at end of file diff --git a/.github/workflows/build-html5-onLinux.yml b/.github/workflows/build-html5-onLinux.yml deleted file mode 100644 index d57843667..000000000 --- a/.github/workflows/build-html5-onLinux.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: build-upload-html5 -on: [push] -jobs: - create-nightly-html5: - runs-on: ubuntu-latest - steps: - - uses: ninjamuffin99/action-hmm-setup@v1 - - name: Setting up linux - run: | - haxelib run lime setup linux - - name: Build game? - run: | - haxelib run lime build html5 -debug -clean - ls - - name: Install butler and shit - run: | - curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default - unzip butler.zip - chmod +x butler - ./butler -V - - name: Upload game to itch.io - env: - BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY}} - run: | - ./butler login - ./butler push export/debug/html5/bin ninja-muffin24/funkin-secret:html5-${GITHUB_REF##*/} - diff --git a/.github/workflows/build-shit.yml b/.github/workflows/build-shit.yml new file mode 100644 index 000000000..abbacc7d3 --- /dev/null +++ b/.github/workflows/build-shit.yml @@ -0,0 +1,63 @@ +name: build-upload +on: [push, workflow_dispatch] +jobs: + create-nightly-html5: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-haxeshit + - name: Build game? + run: | + haxelib run lime build html5 -debug + ls + - uses: ./.github/actions/upload-itch + with: + butler-key: ${{ secrets.BUTLER_API_KEY}} + build-dir: export/debug/html5/bin + target: html5 + create-nightly-win: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-haxeshit + - name: Build game + run: | + haxelib run lime build windows -debug + dir + - uses: ./.github/actions/upload-itch + with: + butler-key: ${{ secrets.BUTLER_API_KEY}} + build-dir: export/debug/windows/bin + target: win + create-nightly-mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-haxeshit + - name: Build game? + run: | + haxelib run lime build mac -debug + ls + - uses: ./.github/actions/upload-itch + with: + butler-key: ${{ secrets.BUTLER_API_KEY}} + build-dir: export/debug/macos/bin + target: mac + create-nightly-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-haxeshit + - name: Setting up Linux + run: | + haxelib run lime setup linux + - name: Build game? + run: | + haxelib run lime build linux -debug + ls + - uses: ./.github/actions/upload-itch + with: + butler-key: ${{ secrets.BUTLER_API_KEY}} + build-dir: export/debug/linux/bin + target: linux +