From 8b8087c7d1ed393cb37a3eef5e4f92bddb957354 Mon Sep 17 00:00:00 2001 From: Zaytha Date: Sun, 6 Jul 2025 16:44:33 -0700 Subject: [PATCH] Adding to linux version --- .gitea/workflows/godot-ci.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/godot-ci.yml b/.gitea/workflows/godot-ci.yml index 74a3317..7e70ba1 100644 --- a/.gitea/workflows/godot-ci.yml +++ b/.gitea/workflows/godot-ci.yml @@ -38,8 +38,8 @@ jobs: mkdir -v -p ~/.local/share/godot/export_templates/ mkdir -v -p ~/.config/ - # This step updates the version_text.gd file with info about this build. - # If it isn't in the expected spot of game/scripts/version_text.gd, it will be skipped. + # 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" @@ -89,19 +89,46 @@ jobs: 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: Setup run: | 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 run: | mkdir -v -p build/bin/linux EXPORT_DIR="$(readlink -f build/bin)" cd $PROJECT_PATH godot --headless --verbose --export-release "Linux" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64" + - name: Upload Artifact uses: https://gitea.com/actions/upload-artifact@v3 # using v3 ad v4 has issues wwith gitea with: