From 211d2b161b0c209fba53a9bf08360fc495237950 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Tue, 25 Feb 2025 10:53:13 +0100 Subject: [PATCH 1/2] Add Windows portable package --- ...ml => generate-windows-packages-debug.yml} | 27 ++++++++++++++++--- ...ller.yml => generate-windows-packages.yml} | 25 ++++++++++++++--- 2 files changed, 45 insertions(+), 7 deletions(-) rename .github/workflows/{generate-windows-installer-debug.yml => generate-windows-packages-debug.yml} (57%) rename .github/workflows/{generate-windows-installer.yml => generate-windows-packages.yml} (58%) diff --git a/.github/workflows/generate-windows-installer-debug.yml b/.github/workflows/generate-windows-packages-debug.yml similarity index 57% rename from .github/workflows/generate-windows-installer-debug.yml rename to .github/workflows/generate-windows-packages-debug.yml index 029c57b0..703e5a48 100644 --- a/.github/workflows/generate-windows-installer-debug.yml +++ b/.github/workflows/generate-windows-packages-debug.yml @@ -1,4 +1,4 @@ -name: Generate Windows Installer (Debug) +name: Generate Windows Packages (Debug) on: release: @@ -9,7 +9,7 @@ permissions: jobs: generate-windows-installer: - name: Generate Windows Installer (Debug) + name: Generate Windows Packages (Debug) runs-on: windows-latest steps: @@ -40,15 +40,34 @@ jobs: path: tools/windows-installer/turing-system-monitor.iss options: /O+ + - name: Create portable zip archive from generated binaries + run: | + rm -rf "res/themes/--Theme examples" + mv dist/turing-system-monitor dist/turing-system-monitor-${{github.event.release.tag_name}}-debug + 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip dist/turing-system-monitor-${{github.event.release.tag_name}}-debug + - name: '📦 Archive Windows installer' uses: actions/upload-artifact@v4 with: - name: turing-system-monitor_${{github.event.release.tag_name}} + name: turing-system-monitor_${{github.event.release.tag_name}}-debug path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-debug.exe if-no-files-found: error + - name: '📦 Archive Windows portable archive' + uses: actions/upload-artifact@v4 + with: + name: turing-system-monitor_${{github.event.release.tag_name}}-portable-debug + path: turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip + if-no-files-found: error + - name: '📩 Publish Windows installer to Release' run: | gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-debug.exe env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: '📩 Publish Windows portable zip to Release' + run: | + gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-windows-installer.yml b/.github/workflows/generate-windows-packages.yml similarity index 58% rename from .github/workflows/generate-windows-installer.yml rename to .github/workflows/generate-windows-packages.yml index 5b40b675..ef1a219c 100644 --- a/.github/workflows/generate-windows-installer.yml +++ b/.github/workflows/generate-windows-packages.yml @@ -1,4 +1,4 @@ -name: Generate Windows Installer +name: Generate Windows Packages on: release: @@ -9,7 +9,7 @@ permissions: jobs: generate-windows-installer: - name: Generate Windows Installer + name: Generate Windows Packages runs-on: windows-latest steps: @@ -40,6 +40,12 @@ jobs: path: tools/windows-installer/turing-system-monitor.iss options: /O+ + - name: Create portable zip archive from generated binaries + run: | + rm -rf "res/themes/--Theme examples" + mv dist/turing-system-monitor dist/turing-system-monitor-${{github.event.release.tag_name}} + 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable.zip dist/turing-system-monitor-${{github.event.release.tag_name}} + - name: '📦 Archive Windows installer' uses: actions/upload-artifact@v4 with: @@ -47,8 +53,21 @@ jobs: path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe if-no-files-found: error + - name: '📦 Archive Windows portable archive' + uses: actions/upload-artifact@v4 + with: + name: turing-system-monitor_${{github.event.release.tag_name}}-portable + path: turing-system-monitor-${{github.event.release.tag_name}}-portable.zip + if-no-files-found: error + - name: '📩 Publish Windows installer to Release' run: | gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: '📩 Publish Windows portable zip to Release' + run: | + gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-portable.zip + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a8108e9f2140d6fce2b5b3866fb710573ea8807a Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Wed, 26 Feb 2025 08:32:23 +0100 Subject: [PATCH 2/2] Fix packaging actions for Powershell --- .../workflows/generate-windows-packages-debug.yml | 12 ++++++------ .github/workflows/generate-windows-packages.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/generate-windows-packages-debug.yml b/.github/workflows/generate-windows-packages-debug.yml index 703e5a48..1cc37710 100644 --- a/.github/workflows/generate-windows-packages-debug.yml +++ b/.github/workflows/generate-windows-packages-debug.yml @@ -33,6 +33,7 @@ jobs: - name: Run PyInstaller to create binaries run: | pyinstaller.exe --noconfirm turing-system-monitor-debug.spec + "${{github.event.release.tag_name}}-debug" | Out-File ".\dist\turing-system-monitor\version.txt" - name: Create InnoSetup installer from generated binaries uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 @@ -42,21 +43,20 @@ jobs: - name: Create portable zip archive from generated binaries run: | - rm -rf "res/themes/--Theme examples" - mv dist/turing-system-monitor dist/turing-system-monitor-${{github.event.release.tag_name}}-debug - 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip dist/turing-system-monitor-${{github.event.release.tag_name}}-debug + Remove-Item -r ".\dist\turing-system-monitor\res\themes\--Theme examples\" + 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip ".\dist\turing-system-monitor" - name: '📦 Archive Windows installer' uses: actions/upload-artifact@v4 with: - name: turing-system-monitor_${{github.event.release.tag_name}}-debug + name: turing-system-monitor-${{github.event.release.tag_name}}-debug path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-debug.exe if-no-files-found: error - name: '📦 Archive Windows portable archive' uses: actions/upload-artifact@v4 with: - name: turing-system-monitor_${{github.event.release.tag_name}}-portable-debug + name: turing-system-monitor-${{github.event.release.tag_name}}-portable-debug path: turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip if-no-files-found: error @@ -68,6 +68,6 @@ jobs: - name: '📩 Publish Windows portable zip to Release' run: | - gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip + gh release upload ${{github.event.release.tag_name}} turing-system-monitor-${{github.event.release.tag_name}}-portable-debug.zip env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-windows-packages.yml b/.github/workflows/generate-windows-packages.yml index ef1a219c..2cb4dc1a 100644 --- a/.github/workflows/generate-windows-packages.yml +++ b/.github/workflows/generate-windows-packages.yml @@ -33,6 +33,7 @@ jobs: - name: Run PyInstaller to create binaries run: | pyinstaller.exe --noconfirm turing-system-monitor.spec + "${{github.event.release.tag_name}}" | Out-File ".\dist\turing-system-monitor\version.txt" - name: Create InnoSetup installer from generated binaries uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 @@ -42,21 +43,20 @@ jobs: - name: Create portable zip archive from generated binaries run: | - rm -rf "res/themes/--Theme examples" - mv dist/turing-system-monitor dist/turing-system-monitor-${{github.event.release.tag_name}} - 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable.zip dist/turing-system-monitor-${{github.event.release.tag_name}} + Remove-Item -r ".\dist\turing-system-monitor\res\themes\--Theme examples\" + 7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable.zip ".\dist\turing-system-monitor" - name: '📦 Archive Windows installer' uses: actions/upload-artifact@v4 with: - name: turing-system-monitor_${{github.event.release.tag_name}} + name: turing-system-monitor-${{github.event.release.tag_name}} path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe if-no-files-found: error - name: '📦 Archive Windows portable archive' uses: actions/upload-artifact@v4 with: - name: turing-system-monitor_${{github.event.release.tag_name}}-portable + name: turing-system-monitor-${{github.event.release.tag_name}}-portable path: turing-system-monitor-${{github.event.release.tag_name}}-portable.zip if-no-files-found: error @@ -68,6 +68,6 @@ jobs: - name: '📩 Publish Windows portable zip to Release' run: | - gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-portable.zip + gh release upload ${{github.event.release.tag_name}} turing-system-monitor-${{github.event.release.tag_name}}-portable.zip env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}