add back commit sha to release file name

This commit is contained in:
2025-10-20 17:40:39 +02:00
parent dd6d16d833
commit de2e49e60b
2 changed files with 19 additions and 17 deletions
+10 -9
View File
@@ -25,14 +25,14 @@ jobs:
matrix:
include:
- os: ubuntu-latest
artifact_name: SoftwareManager-dev-linux
asset_name: SoftwareManager-dev-linux
artifact_name: SoftwareManager-dev-${{ github.sha }}-linux
asset_name: SoftwareManager-dev-${{ github.sha }}-linux
- os: windows-latest
artifact_name: SoftwareManager-dev-windows.exe
asset_name: SoftwareManager-dev-windows.exe
artifact_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
asset_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
- os: macos-latest
artifact_name: SoftwareManager-dev-macos
asset_name: SoftwareManager-dev-macos
artifact_name: SoftwareManager-dev-${{ github.sha }}-macos
asset_name: SoftwareManager-dev-${{ github.sha }}-macos
runs-on: ${{ matrix.os }}
outputs:
@@ -141,9 +141,10 @@ jobs:
with:
tag_name: ${{ needs.build.outputs.version }}
name: ${{ needs.build.outputs.version }}
prerelease: true
files: |
release/SoftwareManager-dev-linux
release/SoftwareManager-dev-windows.exe
release/SoftwareManager-dev-macos
release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-linux
release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-windows.exe
release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-macos
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+9 -8
View File
@@ -38,19 +38,20 @@ from core.interface.utils.searchhelper import return_pressed
from core.interface.dialogs.settings import settings_dialog
from core.network.aria2_integration import dlprogress
def download_update():
filename = "SoftwareManager-dev-windows.exe"
url = "https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-windows.exe"
def download_update(latest_version):
old_filename = f"SoftwareManager-dev-{state.version}-windows.exe"
new_filename = f"SoftwareManager-dev-{latest_version}-windows.exe"
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version}-windows.exe"
print("Downloading update...")
if os.path.exists(filename):
os.remove(filename)
if os.path.exists(old_filename):
os.remove(old_filename)
response = r.get(url, allow_redirects=True)
with open(filename, "wb") as f:
with open(new_filename, "wb") as f:
f.write(response.content)
if not os.path.exists(filename):
if not os.path.exists(new_filename):
raise FileNotFoundError(f"Executable not found")
subprocess.Popen([filename], shell=True)
subprocess.Popen([new_filename], shell=True)
time.sleep(0.5)
sys.exit(0)