From e950d2f90dfb0ed19ab2e2499833d38ab9b3bfd5 Mon Sep 17 00:00:00 2001 From: shayaa <101264710+Vxrtrauter@users.noreply.github.com> Date: Sat, 20 Dec 2025 04:29:22 +0100 Subject: [PATCH] Refactor dev.yml to use bash for build steps Updated the workflow to use bash for injecting commit hash and building executables on Windows and Unix. (done with claude) --- .github/workflows/dev.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f888622..ba195c7 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -81,14 +81,14 @@ jobs: echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT echo "Generated version: $VERSION" - - name: Inject commit hash into code (Windows) - if: runner.os == 'Windows' - shell: pwsh + - name: Inject commit hash into code + shell: bash run: | - $json = '{ - "version": "' + $env:VERSION + '" - }' - $json | Out-File -Encoding utf8 build_info.json + cat > build_info.json << EOF + { + "version": "${{ env.VERSION }}" + } + EOF - name: Download aria2c (Windows) if: runner.os == 'Windows' @@ -99,11 +99,24 @@ jobs: - name: Build executable with PyInstaller (Windows) if: runner.os == 'Windows' - run: pyinstaller --onefile --windowed --add-data "build_info.json:." --add-data "deps/aria2c.exe:." --name ${{ env.APP_NAME }} main.py + shell: bash + run: | + pyinstaller --onefile --windowed \ + --add-data "build_info.json;." \ + --add-data "deps/aria2c.exe;." \ + --add-data "core/interface/assets;core/interface/assets" \ + --name ${{ env.APP_NAME }} \ + main.py - name: Build executable with PyInstaller (Unix) if: runner.os != 'Windows' - run: pyinstaller --onefile --windowed --name ${{ env.APP_NAME }} main.py + shell: bash + run: | + pyinstaller --onefile --windowed \ + --add-data "build_info.json:." \ + --add-data "core/interface/assets:core/interface/assets" \ + --name ${{ env.APP_NAME }} \ + main.py - name: Make executable (Unix) if: runner.os != 'Windows'