58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
name: CI Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
RenpyVersion: "8.3.7"
|
|
RenkitVersion: "6.0.0"
|
|
JAVA_HOME: "/usr/lib/jvm/java-21-openjdk-amd64"
|
|
|
|
jobs:
|
|
build-and-archive:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ${{ gitea.repository }}
|
|
fetch-depth: 1
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install git libgl1 openjdk-21-jdk golang-go -y
|
|
JAVA_HOME="/usr/lib/jvm/open-jdk"
|
|
|
|
- name: Update Internal Build Name
|
|
run: |
|
|
sed -i -e "s/INTERNAL-BUILD/${{ gitea.ref_name }}/g" game/options.rpy
|
|
sed -i -e "s/INTERNAL-BUILD/${{ gitea.ref_name }}/g" android.json
|
|
|
|
- name: Build With Renkit
|
|
run: |
|
|
mkdir dist
|
|
sed -i -e "s/VERSION/${{ env.RenpyVersion }}/g" renconstruct-gitea.toml # This is so we can control the renpy version just from this script
|
|
wget -q "https://github.com/kobaltcore/renkit/releases/download/v${{ env.RenkitVersion }}/renkit-x86_64-unknown-linux-gnu.tar.xz" -O renkit.tar.xz
|
|
tar -xJf renkit.tar.xz -C /tmp/
|
|
rm renkit.tar.xz
|
|
/tmp/renkit-x86_64-unknown-linux-gnu/renconstruct build -c "./renconstruct-gitea.toml" "." dist/
|
|
mkdir "dist/android"
|
|
mv dist/*.apk "dist/android"
|
|
|
|
- name: Upload Release
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: dist/*
|
|
api_key: '${{ secrets.RELEASE_SMITH_TOKEN }}'
|
|
#
|
|
# - name: Nextcloud Artifact
|
|
# uses: trympet/nextcloud-artifacts-action@v2
|
|
# with:
|
|
# name: 'Wani' # Name of the artifact
|
|
# path: 'dist/**' # Globbing supported
|
|
# nextcloud-url: 'https://cloud.dev.cavemanon.xyz/remote.php/dav/files/ReleaseSmith/Wani/Internal%20Builds/SOMETHING/' # Nextcloud URL
|
|
# nextcloud-username: "ReleaseSmith"
|
|
# nextcloud-password: ${{ secrets.RELEASE_SMITH_NEXTCLOUD_PASSWORD }} |