102 lines
3.4 KiB
YAML
102 lines
3.4 KiB
YAML
#
|
|
# .gitea/gitea-ci.yaml
|
|
#
|
|
#
|
|
|
|
name: "godot-ci export"
|
|
on: push
|
|
|
|
env:
|
|
GODOT_VERSION: 4.3
|
|
EXPORT_NAME: test-project
|
|
PROJECT_PATH: .
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
#- name: Get Godot Version
|
|
# run: |
|
|
# # Add specific Godot Version to project.godot = `config/features=PackedStringArray("4.2", "4.2.2", "Forward Plus")`
|
|
# echo "GODOT_VERSION=$(grep '^config/features' project.godot | cut -d "\"" -f 4)" >> $GITHUB_ENV
|
|
|
|
- name: Download Godot
|
|
run: |
|
|
echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip"
|
|
curl -L -o godot.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip
|
|
unzip godot.zip
|
|
mv Godot_v$GODOT_VERSION-stable_linux.x86_64 godot
|
|
chmod +x godot
|
|
|
|
- name: Download Godot Export Templates
|
|
run: |
|
|
echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz"
|
|
curl -L -o export_templates.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz
|
|
unzip export_templates.zip
|
|
|
|
- name: Install Export Templates
|
|
run: |
|
|
mkdir -p ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
|
|
mv ./templates/* ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
|
|
|
|
#- name: Build
|
|
# run: |
|
|
# ./godot --headless --export-release html
|
|
# ./godot --headless --export-release linux
|
|
# ./godot --headless --export-release macos
|
|
# ./godot --headless --export-release windows
|
|
|
|
- name: Windows Build
|
|
run: |
|
|
mkdir -v -p build/windows
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
cd $PROJECT_PATH
|
|
./godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
|
|
|
ls -la "$EXPORT_DIR/windows/"
|
|
- name: Upload Artifact
|
|
run: |
|
|
echo $EXPORT_DIR
|
|
pwd
|
|
ls -la
|
|
ls -la build
|
|
ls -la build/windows
|
|
ls -la "$EXPORT_DIR/windows/"
|
|
curl --user ${{ github.repository_owner }}:${{ secrets.TOKEN }} \
|
|
--upload-file "$EXPORT_DIR/windows/$EXPORT_NAME.exe" \
|
|
https://gitea.sanplex.tech/api/packages/sansan/generic/GodotTest/0.0.1/$EXPORT_NAME.exe
|
|
|
|
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: windows
|
|
# path: build/windows
|
|
|
|
- name: Linux Build
|
|
run: |
|
|
mkdir -v -p build/linux
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
cd $PROJECT_PATH
|
|
godot --headless --verbose --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
|
#- name: Upload Artifact
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: linux
|
|
# path: build/linux
|
|
|
|
#- name: Zip HTML Export
|
|
# run: |
|
|
# cd exports/html
|
|
# zip $PROJECT_NAME-html.zip -r -m *
|
|
# mv $PROJECT_NAME-html.zip ..
|
|
# cd -
|
|
|
|
#- name: Save Artifacts for Next Job
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: exports
|
|
# path: exports
|