Test with preparing build assets
Some checks failed
godot-ci export / Linux Export (push) Failing after 29s
godot-ci export / Prepare Build Assets (push) Successful in 1m9s
godot-ci export / Windows Export (push) Successful in 44s
godot-ci export / Steam Publish (push) Has been skipped

This commit is contained in:
2025-07-07 04:38:55 -07:00
parent 44b0323b8a
commit 147d6b2d04

View File

@ -14,9 +14,9 @@ env:
ACTIONS_STEP_DEBUG: true ACTIONS_STEP_DEBUG: true
jobs: jobs:
export-windows: prepare-build:
name: Windows Export name: Prepare Build Assets
runs-on: ubuntu-22.04 # Use 22.04 with godot 4 runs-on: ubuntu-22.04
container: container:
image: barichello/godot-ci:mono-4.4.1 # change to mono image: barichello/godot-ci:mono-4.4.1 # change to mono
steps: steps:
@ -33,10 +33,6 @@ jobs:
uses: https://gitea.com/actions/checkout@v4 uses: https://gitea.com/actions/checkout@v4
with: with:
lfs: true lfs: true
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/
mkdir -v -p ~/.config/
# Update the version_text.gd file with info about this build. # Update the version_text.gd file with info about this build.
# If it isn't in the expected spot of game/scripts/version_text.gd skip it # If it isn't in the expected spot of game/scripts/version_text.gd skip it
@ -61,12 +57,10 @@ jobs:
echo "version_text.gd not found at $VERSION_FILE, skipping." echo "version_text.gd not found at $VERSION_FILE, skipping."
fi fi
# Download the exprot templates from the link provided in the secrets
# The expected format is a zip that contains windows and linux export and debug templates
- name: Download Export Templates - name: Download Export Templates
run: | run: |
# Download from zip from ${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}
# Unzip downloaded file to $PROJECT_PATH/build/build_dependencies/export_templates/
# If the directory doesn't exist, create it
if [ -z "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" ]; then if [ -z "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" ]; then
echo "No export template download link provided, cancelling build" echo "No export template download link provided, cancelling build"
exit 1 exit 1
@ -80,6 +74,44 @@ jobs:
# Debug to see if the export templates were downloaded correctly # Debug to see if the export templates were downloaded correctly
ls -la "$PROJECT_PATH/build/build_dependencies/export_templates/" ls -la "$PROJECT_PATH/build/build_dependencies/export_templates/"
- name: Upload Prepared Assets
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: prepared-assets
path: |
game/scripts/version_text.gd
build/build_dependencies/export_templates/
export-windows:
name: Windows Export
runs-on: ubuntu-22.04
needs: prepare-build
container:
image: barichello/godot-ci:mono-4.4.1
steps:
- name: Install Node.js
run: |
apt-get update
apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
- name: Checkout
uses: https://gitea.com/actions/checkout@v4
with:
lfs: true
- name: Download Prepared Assets
uses: https://gitea.com/actions/download-artifact@v3
with:
name: prepared-assets
path: .
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/
mkdir -v -p ~/.config/
- name: Windows Build - name: Windows Build
run: | run: |
mkdir -v -p build/bin/windows mkdir -v -p build/bin/windows
@ -93,7 +125,6 @@ jobs:
name: windows name: windows
path: build/bin/windows path: build/bin/windows
export-linux: export-linux:
name: Linux Export name: Linux Export
runs-on: ubuntu-22.04 # Use 22.04 with godot 4 runs-on: ubuntu-22.04 # Use 22.04 with godot 4
@ -113,34 +144,17 @@ jobs:
uses: https://gitea.com/actions/checkout@v4 uses: https://gitea.com/actions/checkout@v4
with: with:
lfs: true lfs: true
- name: Download Prepared Assets
uses: https://gitea.com/actions/download-artifact@v3
with:
name: prepared-assets
path: .
- name: Setup - name: Setup
run: | run: |
mkdir -v -p ~/.local/share/godot/export_templates/ mkdir -v -p ~/.local/share/godot/export_templates/
# Update the version_text.gd file with info about this build.
# If it isn't in the expected spot of game/scripts/version_text.gd skip it
- name: Populate Version Text
run: |
VERSION_FILE="${PROJECT_PATH}/game/scripts/version_text.gd"
if [ -f "$VERSION_FILE" ]; then
PROJECT_NAME="${EXPORT_NAME}"
COMMIT_NUMBER="${GITHUB_RUN_NUMBER}"
BRANCH_NAME="${GITHUB_REF_NAME}"
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-8)
sed -i "s/var project_name: String = \"X\"/var project_name: String = \"${PROJECT_NAME}\"/" "$VERSION_FILE"
sed -i "s/var commit_number: int = 0/var commit_number: int = ${COMMIT_NUMBER}/" "$VERSION_FILE"
sed -i "s/var branch_name: String = \"X\"/var branch_name: String = \"${BRANCH_NAME}\"/" "$VERSION_FILE"
sed -i "s/var short_sha: String = \"X\"/var short_sha: String = \"${SHORT_SHA}\"/" "$VERSION_FILE"
sed -i "s/var build_override: bool = false/var build_override: bool = true/" "$VERSION_FILE"
echo "Updated version_text.gd:"
cat "$VERSION_FILE"
else
echo "version_text.gd not found at $VERSION_FILE, skipping."
fi
- name: Linux Build - name: Linux Build
run: | run: |
mkdir -v -p build/bin/linux mkdir -v -p build/bin/linux
@ -153,7 +167,7 @@ jobs:
with: with:
name: linux name: linux
path: build/bin/linux path: build/bin/linux
steam-publish: steam-publish:
name: Steam Publish name: Steam Publish
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04