-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# SPDX-FileCopyrightText: 2023 Simon Dalvai <[email protected]> | ||
|
||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
name: Linux upload | ||
|
||
on: | ||
push: | ||
paths: | ||
- "version" | ||
- ".github/workflows/upload-linux.yml" | ||
- "export_presets.linux.example" | ||
|
||
env: | ||
WORKING_DIRECTORY: game | ||
GODOT_VERSION: 3.5.3 | ||
|
||
jobs: | ||
deploy: | ||
if: github.ref == 'refs/heads/prod' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Read version number and version code | ||
run: | | ||
echo "VERSION_NAME=$(cat version | cut -f1 -d-)" >> $GITHUB_ENV | ||
echo "VERSION_CODE=$(cat version | cut -f2 -d-)" >> $GITHUB_ENV | ||
- name: Delete iOS icons | ||
run: rm -rf $WORKING_DIRECTORY/AppIcons | ||
|
||
- name: Create export directory | ||
run: mkdir linux | ||
|
||
- name: Create export_presets.cfg | ||
run: cp game/export_presets.linux.example game/export_presets.cfg | ||
|
||
- name: Cache Godot files | ||
id: cache-godot | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.local/share/godot/** | ||
/usr/local/bin/godot | ||
~/.config/godot/** | ||
key: ${{ runner.os }}-godot-${{ env.GODOT_VERSION }} | ||
|
||
- name: Download and config Godot Engine headless linux server and templates | ||
if: steps.cache-godot.outputs.cache-hit != 'true' | ||
run: | | ||
wget -q https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64.zip | ||
wget -q https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz | ||
mkdir ~/.cache | ||
mkdir -p ~/.config/godot | ||
mkdir -p ~/.local/share/godot/templates/${{ env.GODOT_VERSION }}.stable | ||
unzip Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64.zip | ||
mv Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64 /usr/local/bin/godot | ||
unzip Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz | ||
mv templates/* ~/.local/share/godot/templates/${{ env.GODOT_VERSION }}.stable | ||
rm -f Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64.zip Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz | ||
godot -e -q | ||
- name: Export | ||
run: godot --path ${{ env.WORKING_DIRECTORY }} --export Linux/X11 ${{ inputs.output-file-path }} | ||
|
||
- name: create archive | ||
run: tar -cJf pocket-broomball.tar.xz PocketBroomball.x86_64 PocketBroomball.pck | ||
working-directory: ${{ env.WORKING_DIRECTORY }} | ||
|
||
- name: Upload binaries to Github release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./game/pocket-broomball.tar.xz | ||
asset_name: pocket-broomball.tar.xz | ||
tag: v${{ env.VERSION_NAME }} | ||
overwrite: true | ||
body: ${{ steps.changelog.outputs.RELEASE_BODY }} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[preset.0] | ||
|
||
name="Linux/X11" | ||
platform="Linux/X11" | ||
runnable=true | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="./PocketBroomball.x86_64" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.0.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=true | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true |