Fix invalid paths in GitHub Actions and GitLab CI workflow files (#157)
- Automatically adapt the export folder based on project folder location relative to the repository root. - Update workflow files to use Godot 4.3. - Update default export prest names to match Godot 4.0 onwards.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
image: barichello/godot-ci:4.0.2
|
||||
image: barichello/godot-ci:4.3
|
||||
|
||||
# NOTE: the `cd` command in each build stage is not necessary if your
|
||||
# project.godot is at the repo root
|
||||
# NOTE: If your `project.godot` is at the repository root, set `PROJECT_PATH` below to ".".
|
||||
|
||||
# Cache imported assets between runs
|
||||
cache:
|
||||
@@ -16,6 +15,7 @@ stages:
|
||||
|
||||
variables:
|
||||
EXPORT_NAME: test-project
|
||||
PROJECT_PATH: test-project
|
||||
|
||||
# Open the editor to import assets in case the cache was empty or outdated
|
||||
import-assets:
|
||||
@@ -27,8 +27,9 @@ linux:
|
||||
stage: export
|
||||
script:
|
||||
- mkdir -v -p build/linux
|
||||
- cd $EXPORT_NAME
|
||||
- godot --headless --verbose --export-release "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- godot --headless --verbose --export-release "Linux" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
@@ -38,8 +39,9 @@ windows:
|
||||
stage: export
|
||||
script:
|
||||
- mkdir -v -p build/windows
|
||||
- cd $EXPORT_NAME
|
||||
- godot --headless --verbose --export-release "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
@@ -49,8 +51,9 @@ mac:
|
||||
stage: export
|
||||
script:
|
||||
- mkdir -v -p build/mac
|
||||
- cd $EXPORT_NAME
|
||||
- godot --headless --verbose --export-release "Mac OSX" ../build/mac/$EXPORT_NAME.zip
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- godot --headless --verbose --export-release "macOS" "$EXPORT_DIR/mac/$EXPORT_NAME.zip"
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
@@ -60,8 +63,9 @@ web:
|
||||
stage: export
|
||||
script:
|
||||
- mkdir -v -p build/web
|
||||
- cd $EXPORT_NAME
|
||||
- godot --headless --verbose --export-release "HTML5" ../build/web/index.html
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html"
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
@@ -72,8 +76,9 @@ android_debug:
|
||||
stage: export
|
||||
script:
|
||||
- mkdir -v -p build/android
|
||||
- cd $EXPORT_NAME
|
||||
- godot --headless --verbose --export-debug "Android Debug" ../build/android/$EXPORT_NAME-debug.apk
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- godot --headless --verbose --export-debug "Android Debug" "$EXPORT_DIR/android/$EXPORT_NAME-debug.apk"
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
@@ -95,11 +100,12 @@ android:
|
||||
script:
|
||||
- echo $SECRET_RELEASE_KEYSTORE_BASE64 | base64 --decode > /root/release.keystore
|
||||
- mkdir -v -p build/android
|
||||
- cd $EXPORT_NAME
|
||||
- EXPORT_DIR="$(readlink -f build)"
|
||||
- cd $PROJECT_PATH
|
||||
- sed 's@keystore/release=".*"@keystore/release="'/root/release.keystore'"@g' -i export_presets.cfg
|
||||
- sed 's@keystore/release_user=".*"@keystore/release_user="'$SECRET_RELEASE_KEYSTORE_USER'"@g' -i export_presets.cfg
|
||||
- sed 's@keystore/release_password=".*"@keystore/release_password="'$SECRET_RELEASE_KEYSTORE_PASSWORD'"@g' -i export_presets.cfg
|
||||
- godot --headless --verbose --export-release "Android" ../build/android/$EXPORT_NAME.apk
|
||||
- godot --headless --verbose --export-release "Android" $EXPORT_DIR/android/$EXPORT_NAME.apk
|
||||
artifacts:
|
||||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||||
paths:
|
||||
|
||||
Reference in New Issue
Block a user