Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MewPurPur committed Jun 3, 2024
1 parent bae84cf commit 0fe0bc6
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ assignees: ''

---

**Description:**

Give a clear and concise description of what the bug is and what the expected behavior is. For non-trivial issues, provide reproduction steps and screenshots if relevant.

2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ assignees: ''

---

**Description:**

Describe the limitation you're facing and how the feature will help resolve it. If you can, give more detail about the implementation.
18 changes: 9 additions & 9 deletions .github/actions/set-up-godot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ runs:
# Set up folders for Godot editor and export templates.
# This is done before the download step because this uses caching and doesn't always need to download.
# The ~/godot directory is for the editor, so it can be added to PATH.
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
mkdir -v -p ~/godot
- name: Use cache
id: godot-cache
uses:
actions/cache@v4
with:
key: ${{ env.GODOT_VERSION }}-${{ env.GODOT_RELEASE }}
key: ${{ env.GODOT_VERSION }}-stable
path: |
~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.${{ env.GODOT_RELEASE }}
~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
~/godot
- name: Download Godot
if: ${{ steps.godot-cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
# Download Godot editor and export templates from godot-builds repo.
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_export_templates.tpz &
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip &
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz &
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip &
wait
# Unpack the files.
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip -d ~ &
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_export_templates.tpz -d ~ &
unzip Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip -d ~ &
unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz -d ~ &
wait
# Move to correct places.
mv ~/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}
mv ~/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64 ~/godot/godot
mv ~/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
mv ~/Godot_v${GODOT_VERSION}-stable_linux.x86_64 ~/godot/godot
- name: Add Godot to path
shell: bash
run: echo "~/godot" >> $GITHUB_PATH
4 changes: 2 additions & 2 deletions .github/workflows/dev-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
run: |
# Download rcedit and install wine.
wget -q https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe
sudo apt-get update
sudo apt-get install -y --fix-missing wine64
sudo apt update
sudo apt install -y --fix-missing wine64
# Move rcedit to different place.
mkdir -v -p ~/.local/share/rcedit
mv rcedit-x64.exe ~/.local/share/rcedit
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/export-optimized.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Export Godot Templates
name: export-optimized

on:
workflow_dispatch:
Expand Down Expand Up @@ -91,52 +91,52 @@ jobs:
path: $BUILD_DIR/godot_template_windows

build-web:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check user
run: |
if [ "${{ github.actor }}" != "MewPurPur" ]; then
echo "Unauthorized user: ${{ github.actor }}"
exit 1
fi
- name: Install dependencies
run: sudo apt-get install -y scons python3

- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
shell: bash

- name: Clone Godot repository
run: git clone $GODOT_REPO $GODOT_DIR

- name: Checkout specific commit
run: |
cd $GODOT_DIR
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for Web
run: |
cd $GODOT_DIR
source ../emsdk/emsdk_env.sh
scons platform=javascript target=release_debug $BUILD_OPTIONS
mkdir -p ../$BUILD_DIR/godot_template_web
cp bin/godot.javascript.opt.* ../$BUILD_DIR/godot_template_web
- name: Upload Web template
uses: actions/upload-artifact@v3
with:
name: godot_template_web
path: $BUILD_DIR/godot_template_web
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check user
run: |
if [ "${{ github.actor }}" != "MewPurPur" ]; then
echo "Unauthorized user: ${{ github.actor }}"
exit 1
fi
- name: Install dependencies
run: sudo apt-get install -y scons python3

- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
shell: bash

- name: Clone Godot repository
run: git clone $GODOT_REPO $GODOT_DIR

- name: Checkout specific commit
run: |
cd $GODOT_DIR
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for Web
run: |
cd $GODOT_DIR
source ../emsdk/emsdk_env.sh
scons platform=javascript target=release_debug $BUILD_OPTIONS
mkdir -p ../$BUILD_DIR/godot_template_web
cp bin/godot.javascript.opt.* ../$BUILD_DIR/godot_template_web
- name: Upload Web template
uses: actions/upload-artifact@v3
with:
name: godot_template_web
path: $BUILD_DIR/godot_template_web

build-macos:
runs-on: macos-latest
Expand Down
1 change: 1 addition & 0 deletions src/ui_parts/display.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func _ready() -> void:
if OS.has_feature("web"):
reference_button.disabled = true
reference_button.tooltip_text = "Not currently available on web."
reference_button.mouse_default_cursor_shape = CURSOR_ARROW

func _unhandled_input(input_event: InputEvent) -> void:
if Input.is_action_pressed("debug"):
Expand Down

0 comments on commit 0fe0bc6

Please sign in to comment.