name: itch.io Build # By default, runs if you push to master. keeps your deployed app in sync with master branch. on: push: branches: - main - master # to only run when you do a new github release, comment out above part and uncomment the below trigger. # on: # release: # types: # - published permissions: contents: write # for committing to gh-pages branch. jobs: build-itch-io: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 # repo checkout - uses: actions-rs/toolchain@v1 # get rust toolchain for wasm with: profile: minimal toolchain: stable target: wasm32-unknown-unknown override: true - name: Rust Cache # cache the rust build artefacts uses: Swatinem/rust-cache@v2 - name: Download and install Trunk binary run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- - name: Update file run: sed -i '15d' index.html - name: Build run: ./trunk build --release - name: Itch.io - Publish uses: KikimoraGames/itch-publish@v0.0.3 with: gameData: ./dist itchUsername: mevlyshkin itchGameId: rpack buildChannel: wasm butlerApiKey: ${{ secrets.butlerApi }}