From 0fe0bc665c8953678a1de6f37b9a308f57c6edd8 Mon Sep 17 00:00:00 2001 From: MewPurPur Date: Mon, 3 Jun 2024 23:57:23 +0300 Subject: [PATCH] Fix workflows --- .github/ISSUE_TEMPLATE/bug_report.md | 3 + .github/ISSUE_TEMPLATE/feature_request.md | 2 + .github/actions/set-up-godot/action.yml | 18 ++--- .github/workflows/dev-desktop.yml | 4 +- .github/workflows/export-optimized.yml | 94 +++++++++++------------ src/ui_parts/display.gd | 1 + 6 files changed, 64 insertions(+), 58 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a05e3b8e..ae6d6ab3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 3191b285..402e6892 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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. diff --git a/.github/actions/set-up-godot/action.yml b/.github/actions/set-up-godot/action.yml index 5585493f..06dee166 100644 --- a/.github/actions/set-up-godot/action.yml +++ b/.github/actions/set-up-godot/action.yml @@ -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 diff --git a/.github/workflows/dev-desktop.yml b/.github/workflows/dev-desktop.yml index 110aabe5..ec38f938 100644 --- a/.github/workflows/dev-desktop.yml +++ b/.github/workflows/dev-desktop.yml @@ -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 diff --git a/.github/workflows/export-optimized.yml b/.github/workflows/export-optimized.yml index 219f2f26..b87a557c 100644 --- a/.github/workflows/export-optimized.yml +++ b/.github/workflows/export-optimized.yml @@ -1,4 +1,4 @@ -name: Build and Export Godot Templates +name: export-optimized on: workflow_dispatch: @@ -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 diff --git a/src/ui_parts/display.gd b/src/ui_parts/display.gd index 073f80b4..4d87c3bd 100644 --- a/src/ui_parts/display.gd +++ b/src/ui_parts/display.gd @@ -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"):