Updating action to check for varibles,
renamed version_text to version_label, removed undded files from repo that are made on build
This commit is contained in:
@ -18,6 +18,16 @@ jobs:
|
|||||||
name: Prepare Build Assets
|
name: Prepare Build Assets
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
# Ensure dl link is provided before starting build process
|
||||||
|
- name: Check Gitea Variables
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" ]; then
|
||||||
|
echo "No export template download link provided, cancelling build"
|
||||||
|
echo "Please set the EXPORT_TEMPLATE_DOWNLOAD_LINK secret in Gitea"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# By default ubuntu-22.04 has nodejs 12, but we need a more modern version for the actions/checkout@v4
|
# By default ubuntu-22.04 has nodejs 12, but we need a more modern version for the actions/checkout@v4
|
||||||
# Should make my docker image for this step in the future
|
# Should make my docker image for this step in the future
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
@ -33,11 +43,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
# Update the version_text.gd file with info about this build.
|
# Update the version_info.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_info.gd skip it
|
||||||
- name: Populate Version Text
|
- name: Populate Version Text
|
||||||
run: |
|
run: |
|
||||||
VERSION_FILE="${PROJECT_PATH}/game/scripts/version_text.gd"
|
VERSION_FILE="${PROJECT_PATH}/game/scripts/version_info.gd"
|
||||||
if [ -f "$VERSION_FILE" ]; then
|
if [ -f "$VERSION_FILE" ]; then
|
||||||
PROJECT_NAME="${EXPORT_NAME}"
|
PROJECT_NAME="${EXPORT_NAME}"
|
||||||
COMMIT_NUMBER="${GITHUB_RUN_NUMBER}"
|
COMMIT_NUMBER="${GITHUB_RUN_NUMBER}"
|
||||||
@ -50,21 +60,16 @@ jobs:
|
|||||||
sed -i "s/var short_sha: String = \"X\"/var short_sha: String = \"${SHORT_SHA}\"/" "$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"
|
sed -i "s/var build_override: bool = false/var build_override: bool = true/" "$VERSION_FILE"
|
||||||
|
|
||||||
echo "Updated version_text.gd:"
|
echo "Updated version_info.gd:"
|
||||||
cat "$VERSION_FILE"
|
cat "$VERSION_FILE"
|
||||||
else
|
else
|
||||||
echo "version_text.gd not found at $VERSION_FILE, skipping."
|
echo "version_info.gd not found at $VERSION_FILE, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download the exprot templates from the link provided in the secrets
|
# 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
|
# 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: |
|
||||||
if [ -z "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" ]; then
|
|
||||||
echo "No export template download link provided, cancelling build"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$PROJECT_PATH/build/build_dependencies/export_templates"
|
mkdir -p "$PROJECT_PATH/build/build_dependencies/export_templates"
|
||||||
curl -L "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" -o "$PROJECT_PATH/build/build_dependencies/export_templates/export_templates.zip"
|
curl -L "${{ secrets.EXPORT_TEMPLATE_DOWNLOAD_LINK }}" -o "$PROJECT_PATH/build/build_dependencies/export_templates/export_templates.zip"
|
||||||
unzip -o "$PROJECT_PATH/build/build_dependencies/export_templates/export_templates.zip" -d "$PROJECT_PATH/build/build_dependencies/export_templates/"
|
unzip -o "$PROJECT_PATH/build/build_dependencies/export_templates/export_templates.zip" -d "$PROJECT_PATH/build/build_dependencies/export_templates/"
|
||||||
@ -79,7 +84,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: prepared-assets
|
name: prepared-assets
|
||||||
path: |
|
path: |
|
||||||
game/scripts/version_text.gd
|
game/scripts/version_info.gd
|
||||||
build/build_dependencies/export_templates/
|
build/build_dependencies/export_templates/
|
||||||
|
|
||||||
export-windows:
|
export-windows:
|
||||||
@ -167,6 +172,28 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: [export-windows, export-linux]
|
needs: [export-windows, export-linux]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
# Ensure steam info is provided
|
||||||
|
- name: Check Gitea Variables
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ vars.STEAM_BUILD_USERNAME }}" ]; then
|
||||||
|
echo "No Steam Username variable, cancelling build"
|
||||||
|
echo "Please set the STEAM_BUILD_USERNAME variable in Gitea"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${{ secrets.STEAM_BUILD_PASSWORD }}" ]; then
|
||||||
|
echo "No Steam Password secret, cancelling build"
|
||||||
|
echo "Please set the STEAM_BUILD_PASSWORD secret in Gitea"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${{ secrets.STEAM_GUARD_CODE }}" ]; then
|
||||||
|
echo "No Steam Guard Code secret, cancelling build"
|
||||||
|
echo "Please set the STEAM_GUARD_CODE secret in Gitea"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# I can't use the c2msnetwork/steamcmd bc I need to instlal git and nodejs for the actions/checkout@v4 to work
|
# I can't use the c2msnetwork/steamcmd bc I need to instlal git and nodejs for the actions/checkout@v4 to work
|
||||||
# and I would need root access to install them, which root breaks saving the cache file
|
# and I would need root access to install them, which root breaks saving the cache file
|
||||||
# So here we setup the dependencies for the missing steamcmd image, nodejs, and git manually
|
# So here we setup the dependencies for the missing steamcmd image, nodejs, and git manually
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,5 @@
|
|||||||
.godot/
|
.godot/
|
||||||
/android/
|
/android/
|
||||||
|
|
||||||
build/bin/linux/*
|
build/bin/*
|
||||||
build/bin/windows/*
|
|
||||||
build/build_dependencies/export_templates/*
|
build/build_dependencies/export_templates/*
|
||||||
@ -9,7 +9,7 @@ custom_features=""
|
|||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path="../videogame.exe"
|
export_path=""
|
||||||
patches=PackedStringArray()
|
patches=PackedStringArray()
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
@ -33,7 +33,7 @@ codesign/timestamp_server_url=""
|
|||||||
codesign/digest_algorithm=1
|
codesign/digest_algorithm=1
|
||||||
codesign/description=""
|
codesign/description=""
|
||||||
codesign/custom_options=PackedStringArray()
|
codesign/custom_options=PackedStringArray()
|
||||||
application/modify_resources=false
|
application/modify_resources=true
|
||||||
application/icon=""
|
application/icon=""
|
||||||
application/console_wrapper_icon=""
|
application/console_wrapper_icon=""
|
||||||
application/icon_interpolation=4
|
application/icon_interpolation=4
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class_name VersionText extends Label
|
class_name VersionInfo extends Label
|
||||||
|
|
||||||
var project_name: String = "X"
|
var project_name: String = "X"
|
||||||
var commit_number: int = 0
|
var commit_number: int = 0
|
||||||
@ -1,4 +1,4 @@
|
|||||||
extends VersionText
|
extends VersionInfo
|
||||||
|
|
||||||
|
|
||||||
@export var show_label_in_editor: bool = true
|
@export var show_label_in_editor: bool = true
|
||||||
|
|||||||
Reference in New Issue
Block a user