Ren'Py CLI GitHub Actions

Home Edit


This post goes over how to set up GitHub Actions workflow with Ren’Py CLI.

Action

To set up GitHub Actions with Ren’Py CLI, use setup-renpy:

# .github/workflows/renpy.yml
on: push
jobs:
  renpy:
    runs-on: ubuntu-latest
    steps:
      - name: Setup Ren'Py
        uses: remarkablegames/setup-renpy@v1

The action downloads the Ren’Py SDK, and exposes the renpy-cli and renpy-launcher binaries for Linux/macOS and renpy executable for Windows:

# .github/workflows/renpy.yml
on: push
jobs:
  renpy-linux:
    runs-on: ubuntu-latest
    steps:
      - name: Setup Ren'Py
        uses: remarkablegames/setup-renpy@v1

      - name: Ren'Py version
        run: |
          renpy-cli --version
          renpy-cli --help

  renpy-windows:
    runs-on: windows-latest
    steps:
      - name: Setup Ren'Py
        uses: remarkablegames/setup-renpy@v1

      - name: Ren'Py version
        run: |
          renpy-cli --version
          renpy-cli --help

Usage

Lint

Check script (lint):

# .github/workflows/lint.yml
on: push
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Ren'Py
        uses: remarkablegames/setup-renpy@v1

      - name: Lint script
        run: renpy-cli game lint

Web Build

Builds a release of the game for web:

# .github/workflows/build.yml
on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Ren'Py
        uses: remarkablegames/setup-renpy@v1
        with:
          web: true

      - name: Web build
        run: renpy-launcher web_build . --destination dist

renpy-launcher is only available for Linux/macOS and is not available for Windows.

Resources