Compare commits

..

1 Commits

Author SHA1 Message Date
shayaa e950d2f90d 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)
2025-12-20 04:29:22 +01:00
+22 -9
View File
@@ -81,14 +81,14 @@ jobs:
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
echo "Generated version: $VERSION" echo "Generated version: $VERSION"
- name: Inject commit hash into code (Windows) - name: Inject commit hash into code
if: runner.os == 'Windows' shell: bash
shell: pwsh
run: | run: |
$json = '{ cat > build_info.json << EOF
"version": "' + $env:VERSION + '" {
}' "version": "${{ env.VERSION }}"
$json | Out-File -Encoding utf8 build_info.json }
EOF
- name: Download aria2c (Windows) - name: Download aria2c (Windows)
if: runner.os == 'Windows' if: runner.os == 'Windows'
@@ -99,11 +99,24 @@ jobs:
- name: Build executable with PyInstaller (Windows) - name: Build executable with PyInstaller (Windows)
if: runner.os == '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) - name: Build executable with PyInstaller (Unix)
if: runner.os != 'Windows' 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) - name: Make executable (Unix)
if: runner.os != 'Windows' if: runner.os != 'Windows'