mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
fix workflows (hopefully)
This commit is contained in:
+19
-14
@@ -66,11 +66,26 @@ 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
|
||||||
run: |
|
run: |
|
||||||
echo '{' > build_info.json
|
COMMIT_SHA=${{ github.sha }}
|
||||||
echo " \"version\": \"${GITHUB_SHA}\"" >> build_info.json
|
SHORT_SHA=${COMMIT_SHA:0:7}
|
||||||
echo '}' >> build_info.json
|
VERSION="${SHORT_SHA}-dev"
|
||||||
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||||
|
echo "Generated version: ${VERSION}"
|
||||||
|
|
||||||
|
- 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
|
- name: Build executable with PyInstaller
|
||||||
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
|
||||||
@@ -114,16 +129,6 @@ jobs:
|
|||||||
find artifacts -type f
|
find artifacts -type f
|
||||||
ls -la artifacts/
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user