Skip to content

Commit 79d6067

Browse files
Append version number to all exported binarys
1 parent 07d7756 commit 79d6067

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,42 @@ jobs:
2929
godot_executable_download_url: https://github.com/not-my-username/godot/releases/download/4.5.2-so_reusraddr/godot.linuxbsd.editor.x86_64.zip
3030
godot_export_templates_download_url: https://github.com/not-my-username/godot/releases/download/4.5.2-so_reusraddr/4.5.2.stable.so_reuseaddr.zip
3131
relative_project_path: ./
32-
archive_output: true
32+
archive_output: false
3333
cache: true
3434
presets_to_export: windows.x86_64, macOS.universal, linux.x86.64
35-
35+
36+
- name: Append version to exported binaries
37+
run: |
38+
set -e
39+
40+
VERSION="${{ inputs.version }}"
41+
DIR="${{ steps.export.outputs.archive_directory }}"
42+
43+
for platform_dir in "$DIR"/*; do
44+
echo "Processing $platform_dir"
45+
cd "$platform_dir"
46+
47+
# Windows
48+
for exe in *.exe; do
49+
[ -e "$exe" ] || continue
50+
mv "$exe" "${exe%.exe}-${VERSION}.exe"
51+
done
52+
53+
# Linux
54+
for bin in *.x86_64; do
55+
[ -e "$bin" ] || continue
56+
mv "$bin" "${bin%.x86_64}-${VERSION}.x86_64"
57+
done
58+
59+
# macOS
60+
for app in *.app; do
61+
[ -e "$app" ] || continue
62+
mv "$app" "${app%.app}-${VERSION}.app"
63+
done
64+
65+
cd - >/dev/null
66+
done
67+
3668
- name: Create git tag
3769
run: |
3870
git tag ${{ inputs.version }}

0 commit comments

Comments
 (0)