diff --git a/.github/workflows/rust-dll-tower-defense-build.yml b/.github/workflows/rust-dll-tower-defense-build.yml index 3baa833b1..0e25e59ba 100644 --- a/.github/workflows/rust-dll-tower-defense-build.yml +++ b/.github/workflows/rust-dll-tower-defense-build.yml @@ -1,30 +1,77 @@ name: Build Rust Windows DLL on: - workflow_dispatch: + workflow_dispatch: jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Install Rust Nightly with MSVC - run: | - rustup default nightly - rustup target add x86_64-pc-windows-msvc - rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc - - - name: Build Rust DLL - run: | - cd apps/rentearth/rust_godot_towerdefense - cargo +nightly build -Z build-std=std,panic_abort -Z unstable-options --target x86_64-pc-windows-msvc --release --out-dir dist/windows - - - name: Upload DLL as Artifact - uses: actions/upload-artifact@v4 - with: - name: rust_godot_towerdefense - path: apps/rentearth/rust_godot_towerdefense/dist/windows/*.dll - #path: dist/windows/*.dll + build: + runs-on: windows-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Rust Nightly with MSVC + run: | + rustup default nightly + rustup target add x86_64-pc-windows-msvc + rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc + + - name: Build Rust DLL + run: | + cd apps/rentearth/rust_godot_towerdefense + cargo +nightly build -Z build-std=std,panic_abort -Z unstable-options --target x86_64-pc-windows-msvc --release --out-dir dist/windows + + - name: Upload DLL as Artifact + uses: actions/upload-artifact@v4 + with: + name: rust_godot_towerdefense + path: apps/rentearth/rust_godot_towerdefense/dist/windows/*.dll + #path: dist/windows/*.dll + + update-dev-branch: + runs-on: ubuntu-latest + needs: ['build'] + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + ref: dev + + - name: Download Built DLL + uses: actions/download-artifact@v4 + with: + name: rust_godot_towerdefense + path: temp_dll + + - name: Replace Existing DLL + run: | + cp temp_dll/rust_godot_towerdefense.dll apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll + + - name: Generate Timestamp for Branch Name + id: timestamp + run: echo "BRANCH_NAME=patch-atomic-update-rust-dll-towerdefense-$(date +'%Y%m%d-%H%M%S')-${{ github.run_id }}" >> $GITHUB_ENV + + - name: Remove temp_dll Folder + run: rm -rf temp_dll + + - name: Create Pull Request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + # Create a new branch based on dev + git checkout -b $BRANCH_NAME + + # Add & commit changes + git add apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll + git commit -m "Update Rust DLL from automated build: Run ID: ${{ github.run_id }}" + + # Push the branch + git push origin update-rust-dll + + # Create a Pull Request using GitHub CLI + gh pr create --base dev --head update-rust-dll --title "Update Rust DLL" --body "Automated build updating the Rust DLL for Godot." \ No newline at end of file diff --git a/apps/kbve/kbve.com/src/content/journal/02-17.mdx b/apps/kbve/kbve.com/src/content/journal/02-17.mdx index bdad7ead8..6d7b4f636 100644 --- a/apps/kbve/kbve.com/src/content/journal/02-17.mdx +++ b/apps/kbve/kbve.com/src/content/journal/02-17.mdx @@ -45,6 +45,12 @@ import { Adsense } from '@kbve/astropad'; Updating the MSVC github action again, the most recent issue was that we forgot to include the nightly as a rust-src. This next update will include and I will adjust the path for upload to be exactly where the DLL is exported. +- 10:07PM + + The rust dll build went as planned, it was definitely smaller too compared to the gnu build. + That means we can continue the production of the extension, yet I should create a cycle where it automatically updates the extensions on our behalf. + Point of climax here will be once we get more git automation running within our repo, I am going to be super excited to see that level of looping. + ### Jedi - User Agents - 05:14PM diff --git a/apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll b/apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll index e512802f2..7ad45c3ad 100644 Binary files a/apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll and b/apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll differ diff --git a/apps/rentearth/rust_godot_towerdefense/src/manager/gui_manager.rs b/apps/rentearth/rust_godot_towerdefense/src/manager/gui_manager.rs index 0de13b604..5cd756b6a 100644 --- a/apps/rentearth/rust_godot_towerdefense/src/manager/gui_manager.rs +++ b/apps/rentearth/rust_godot_towerdefense/src/manager/gui_manager.rs @@ -54,7 +54,7 @@ impl ICanvasLayer for GUIManager { fn input(&mut self, event: Gd) { if let Ok(key_event) = event.try_cast::() { - if key_event.is_pressed() && key_event.get_keycode() == Key::DOLLAR { + if key_event.is_pressed() && key_event.get_keycode() == Key::QUOTELEFT { self.toggle_mouse_passthrough(); } }