Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build & release rom | |
on: | |
push: | |
branches: [master] | |
release: | |
types: [published] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build ROM File | |
runs-on: ubuntu-latest | |
container: devkitpro/devkitarm:20230928 | |
steps: | |
- name: Checkout 'vayan/collie-defense' | |
uses: actions/checkout@v3 | |
- name: Install Python # need manual install because we're in devkitpro/devkitarm container | |
run: | | |
sudo apt-get update | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get update | |
sudo apt-get install python3.11 -y | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 | |
- name: Checkout 'GValiente/butano' | |
uses: actions/checkout@v3 | |
with: | |
repository: GValiente/butano | |
ref: 15.7.1 | |
path: butano | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Load cached dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: python-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Python packages | |
run: poetry install | |
- name: Import levels from LDtk | |
run: make levels TYPE=RELEASE | |
env: | |
LIBBUTANO: ${{ github.workspace }}/butano/butano | |
- name: Build ROM file | |
run: make -j$(nproc) TYPE=RELEASE | |
env: | |
LIBBUTANO: ${{ github.workspace }}/butano/butano | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: collie-defense | |
path: collie-defense.gba | |
retention-days: 7 | |
if-no-files-found: error | |
release-itch: | |
name: Upload ROM File to Itch.io | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: ${{ github.event_name == 'release' }} | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Upload ROM File | |
run: | | |
curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/15.21.0/archive/default | |
unzip butler.zip | |
chmod +x ./butler | |
./butler -V | |
./butler push ./collie-defense/collie-defense.gba xvayan/collie-defense:rom --userversion ${{ github.event.release.tag_name }} | |
env: | |
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} |