mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd6d16d833 | |||
| 7d0c8d16ec | |||
| 80750f010f | |||
| c93f6345c8 | |||
| a7132ed1cd | |||
| a2cff15d0d | |||
| 2eb384f7cf |
+34
-31
@@ -35,6 +35,8 @@ jobs:
|
|||||||
asset_name: SoftwareManager-dev-macos
|
asset_name: SoftwareManager-dev-macos
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -66,13 +68,35 @@ jobs:
|
|||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install pyinstaller
|
pip install pyinstaller
|
||||||
|
|
||||||
- name: Inject commit hash into code
|
- name: Generate version
|
||||||
|
id: version
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "version = '${GITHUB_SHA}'" > build_info.json
|
COMMIT_SHA=${{ github.sha }}
|
||||||
|
SHORT_SHA=${COMMIT_SHA:0:7}
|
||||||
|
VERSION="${SHORT_SHA}-dev"
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
||||||
|
echo "Generated version: $VERSION"
|
||||||
|
|
||||||
- name: Build executable with PyInstaller
|
- name: Inject commit hash into code (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$json = '{
|
||||||
|
"version": "' + $env:VERSION + '"
|
||||||
|
}'
|
||||||
|
$json | Out-File -Encoding utf8 build_info.json
|
||||||
|
|
||||||
|
- name: Build executable with PyInstaller (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --name ${{ env.APP_NAME }} main.py
|
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --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
|
||||||
|
|
||||||
- name: Make executable (Unix)
|
- name: Make executable (Unix)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: chmod +x dist/${{ env.APP_NAME }}
|
run: chmod +x dist/${{ env.APP_NAME }}
|
||||||
@@ -98,46 +122,25 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/download-artifact@v4
|
||||||
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Display downloaded artifacts
|
|
||||||
run: |
|
|
||||||
echo "Downloaded artifacts:"
|
|
||||||
find artifacts -type f
|
|
||||||
ls -la artifacts/
|
|
||||||
|
|
||||||
- name: Generate version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${{ github.sha }}
|
|
||||||
SHORT_SHA=${COMMIT_SHA:0:7}
|
|
||||||
VERSION="${SHORT_SHA}-dev"
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
|
||||||
echo "Generated version: ${VERSION}"
|
|
||||||
|
|
||||||
- name: Prepare release files
|
- name: Prepare release files
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-linux release/SoftwareManager-dev-linux
|
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-linux release/
|
||||||
cp artifacts/windows-latest-build/SoftwareManager-dev-windows.exe release/SoftwareManager-dev-windows.exe
|
cp artifacts/windows-latest-build/SoftwareManager-dev-windows.exe release/
|
||||||
cp artifacts/macos-latest-build/SoftwareManager-dev-macos release/SoftwareManager-dev-macos
|
cp artifacts/macos-latest-build/SoftwareManager-dev-macos release/
|
||||||
chmod +x release/SoftwareManager-dev-linux release/SoftwareManager-dev-macos
|
chmod +x release/SoftwareManager-dev-linux release/SoftwareManager-dev-macos
|
||||||
ls -la release/
|
ls -la release/
|
||||||
|
|
||||||
- name: Create Release (Public)
|
- name: Create Release (Public)
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.version.outputs.version }}
|
tag_name: ${{ needs.build.outputs.version }}
|
||||||
name: ${{ steps.version.outputs.version }}
|
name: ${{ needs.build.outputs.version }}
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
files: |
|
files: |
|
||||||
release/SoftwareManager-dev-linux
|
release/SoftwareManager-dev-linux
|
||||||
release/SoftwareManager-dev-windows.exe
|
release/SoftwareManager-dev-windows.exe
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ from PySide6.QtWidgets import (
|
|||||||
QHeaderView,
|
QHeaderView,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QTableWidget,
|
QTableWidget,
|
||||||
QTableWidgetItem
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from PySide6.QtGui import QIcon, QAction, QCloseEvent, QPalette
|
from PySide6.QtGui import QIcon, QAction, QCloseEvent
|
||||||
import darkdetect
|
import darkdetect
|
||||||
import threading
|
import threading
|
||||||
import platform
|
import platform
|
||||||
@@ -29,7 +28,6 @@ import subprocess
|
|||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
from core.utils.config.settings import save_settings
|
|
||||||
from core.utils.general.wrappers import run_thread
|
from core.utils.general.wrappers import run_thread
|
||||||
from core.utils.data.state import state
|
from core.utils.data.state import state
|
||||||
from core.utils.network.download import download_selected
|
from core.utils.network.download import download_selected
|
||||||
@@ -64,7 +62,7 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
if os.path.exists(build_info_path):
|
if os.path.exists(build_info_path):
|
||||||
with open(build_info_path, "r") as f:
|
with open(build_info_path, "r") as f:
|
||||||
build_info = json.load(f)
|
build_info = json.load(f)
|
||||||
state.version = build_info.get("version", "dev")
|
state.version = build_info.get("version")
|
||||||
|
|
||||||
# Check for updates on Windows
|
# Check for updates on Windows
|
||||||
if state.ignore_updates is False:
|
if state.ignore_updates is False:
|
||||||
|
|||||||
Reference in New Issue
Block a user