name: Raylib to Itch on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - name: install-asdf run: | sudo apt install curl git zip git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0 - name: install-emscripten run: | . $HOME/.asdf/asdf.sh asdf plugin add emsdk https://github.com/RobLoach/asdf-emsdk.git # the following installs emscripten according to whatever version # is specified in the .tools-version file asdf install emsdk - name: build-raylib run: | . $HOME/.asdf/asdf.sh mkdir lib && mkdir lib/web cd dependency/raylib/src make PLATFORM=PLATFORM_WEB -B -e cp libraylib.a ../../../lib/web/ - name: build-web-game run: | . $HOME/.asdf/asdf.sh make web cd output/web zip game.zip index.* - name: install-itch-butler run: | curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default unzip butler.zip chmod +x butler ./butler -V # upload zip - name: upload-to-itch env: BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} run: | cd output/web ./../../butler login # edit the line below: user/game-name:platform ./../../butler push game.zip tradam/raylib-template-test:html5 ./../../butler logout