diff options
| author | realtradam <[email protected]> | 2022-05-18 14:35:25 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-05-18 14:35:25 -0400 |
| commit | 413e74193f6121884ae86dbe7b6e6fc154b94ed4 (patch) | |
| tree | 17872bdb7b8d4cdfdc909106ed98962a89ce3c37 | |
| parent | 75c7b00f6c3f6cc7d6591bb6a2de5c55d1233c5e (diff) | |
| download | raylib-template-master.tar.gz raylib-template-master.zip | |
| -rw-r--r-- | .github/workflows/raylib-to-itch.yml | 18 | ||||
| -rw-r--r-- | README.md | 10 |
2 files changed, 15 insertions, 13 deletions
diff --git a/.github/workflows/raylib-to-itch.yml b/.github/workflows/raylib-to-itch.yml index 30dd56a..f091f1d 100644 --- a/.github/workflows/raylib-to-itch.yml +++ b/.github/workflows/raylib-to-itch.yml @@ -16,45 +16,43 @@ jobs: with: submodules: recursive - # install asdf - - name: asdf-install + - name: install-asdf run: | sudo apt install curl git zip git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0 - # install emcc - 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 - # compile raylib - - name: compile-raylib + - 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/ - # make - - name: build + - name: build-web-game run: | . $HOME/.asdf/asdf.sh make web cd output/web zip game.zip index.* - # install itch butler - - name: install-butler + - 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 + - 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 @@ -8,10 +8,14 @@ This template allows you to automatically build your game and then upload it to ### How modify for your use 1. Create a copy of this template. 2. Edit `.github/workflows/raylib-to-itch.yml` - - change your itch username and game name to your own + - on line 57 you need to edit to use your username and game name 3. Add your Itch API key to: - Settings > Secrets > Actions > New Repository Secret - Name it `BUTLER_API_KEY` -4. Make sure to set a viewport for your game on Itch.io +4. Make sure to set a viewport size for your game on Itch.io -And that should be it, your game should automatically compile and upload to itch when you push to the master branch. +And that should be it, your game should automatically compile and upload to itch when you push to master. + +### Demo + +Here is the raylib "game" automatically created and pushed from this repo: https://tradam.itch.io/raylib-template-test?secret=BzB8ElHics20nzvYSQgqfaha2Q0 |
