Skip to content
play-circle

GitHub Action

GBDK Builder

1.0.7 Latest version

GBDK Builder

play-circle

GBDK Builder

Build gbdbk projects

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GBDK Builder

uses: wujood/gbdk-2020-github-builder@1.0.7

Learn more about this action in wujood/gbdk-2020-github-builder

Choose a version

GBDK GitHub Action Builder

Example Workflow

This action builds gbdk-2020 projects with gcc.

Inputs

subdirectory

The subfolder where the sources are located. Default is "./".

output-name

Rename the output file. The name should no contain special characters. Default is game.

source

Specifies the source name relative to the subdirectory. Default is main.c

Example usage

name: Example Workflow
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    name: Build gbdk project
    steps:
    - name: Checkout project
    - uses: actions/checkout@v2
    - name: Build
      uses: wujood/gbdk-2020-github-builder@1.0.7
      with:
        subdirectory: ./test-sources # Define the source folder. Default is ./
        output-name: your-game # Rename the output file. Default is game
        source: main.c # Main source file of your project. Deafult is main.c

Upload result

name: Example Release
on:  
  release:
    types: 
      - created # This triggers once you create a release from github, not from tagging a commit
jobs:
  test:
    runs-on: ubuntu-latest
    name: Build gbdk project
    steps:
    - name: Checkout project
      uses: actions/checkout@v2
    - name: Build
      uses: wujood/gbdk-2020-github-builder@1.0.7
      with:
        subdirectory: ./test-sources
    - name: Upload binary to release
      uses: svenstaro/upload-release-action@v2
      with:
        repo_token: ${{ secrets.GITHUB_TOKEN }}
        file: ./test-sources/game.gb # Result file from build is called game.gb by default. Rename it with the output-name parameter.
        asset_name: ROM # Rename this to what ever you want
        tag: ${{ github.ref }}