This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Upload export artifacts to GitHub #247
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: Linux Export | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -Dwarnings | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
export-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- uses: rui314/setup-mold@v1 | |
- uses: chickensoft-games/setup-godot@v1 | |
name: Setup Godot | |
with: | |
version: 4.2.2 | |
include-templates: true | |
use-dotnet: false | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "rust -> target" | |
cache-all-crates: "true" | |
- name: Install just | |
run: cargo install just | |
- name: just Check | |
run: just --version | |
- name: Godot Check | |
run: | | |
godot --version | |
- name: Godot Export | |
run: | | |
set -x | |
mkdir godot/.godot | |
touch godot/.godot/extension_list.cfg | |
echo "res://rust.gdextension" >> godot/.godot/extension_list.cfg | |
just linux-release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Linux Godot Spike Binaries | |
path: | | |
export/linux/Godot Spike.x86_64 | |
export/linux/libgodot_plugin.so | |
if-no-files-found: error | |
export-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- uses: rui314/setup-mold@v1 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "oracle" | |
java-version: "22" | |
- uses: chickensoft-games/setup-godot@v1 | |
name: Setup Godot | |
with: | |
version: 4.2.2 | |
include-templates: true | |
use-dotnet: false | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "rust -> target" | |
cache-all-crates: "true" | |
- name: Install just | |
run: cargo install just | |
- name: just Check | |
run: just --version | |
- name: Godot Check | |
run: | | |
godot --version | |
- name: Godot Export | |
run: | | |
set -x | |
godot godot/project.godot --headless --import -q | |
touch godot/.godot/extension_list.cfg | |
echo "res://rust.gdextension" >> godot/.godot/extension_list.cfg | |
echo "export/android/java_sdk_path = \"$(dirname $(dirname $(which java)))\"" >> ~/.config/godot/editor_settings-4.tres | |
echo "export/android/android_sdk_path = \"$(pwd)/dependencies/android-sdk/\"" >> ~/.config/godot/editor_settings-4.tres | |
export GODOT_ANDROID_KEYSTORE_RELEASE_PATH="$PWD/secrets/debug.keystore" | |
export GODOT_ANDROID_KEYSTORE_RELEASE_USER="androiddebugkey" | |
export GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD="android" | |
just setup-android | |
just android-release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Android Godot Spike Binaries | |
path: | | |
export/android/Godot Spike.apk | |
export/android/Godot Spike.apk.idsig | |
if-no-files-found: error |