Skip to content

Commit

Permalink
add option to set bindings repo
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool authored Jan 6, 2024
1 parent e3d9885 commit 80ccc1a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ This repository contains two actions, one for just building the mods, and anothe
# Defaults to MacOS on macOS runners
# Defaults to Android32 on linux runners
target: ''

# What repository to use for bindings. Must be in the format "user/repo". Not required.
bindings: ''

# Which commit/branch to use for bindings. Defaults to latest commit in main branch. Not required.
bindings-ref: ''
```
# Examples
Expand Down
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ inputs:
description: Geode target to build for. Can be either "Win32", "MacOS", "Android32" or "Android64".
required: false
default: ""
bindings:
description: What repository to use for bindings. Must be in the format "user/repo"
required: false
default: "geode-sdk/bindings"
bindings-ref:
description: Which commit/branch to use for bindings. Defaults to latest commit in main branch
required: false
default: ""

outputs:
build-output:
Expand Down Expand Up @@ -96,6 +104,19 @@ runs:
echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
sudo apt install ninja-build
if: inputs.target == 'Android32' || inputs.target == 'Android64'

- name: Download bindings repo
if: inputs.bindings != 'geode-sdk/bindings' || input.bindings-ref != ''
uses: action/checkout@v4
with:
repository: ${{ input.bindings }}
ref: ${{ input.bindings-ref }}
path: bindings-repo

- name: Setup bindings enviroment
if: inputs.bindings != 'geode-sdk/bindings' || input.bindings-ref != ''
shell: bash
run: echo "GEODE_BINDINGS_REPO_PATH=$GITHUB_WORKSPACE/bindings-repo" >> $GITHUB_ENV

- name: Download CLI
uses: robinraju/[email protected]
Expand Down

0 comments on commit 80ccc1a

Please sign in to comment.