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 pyinstaller
|
||||
|
||||
- name: Inject commit hash into code
|
||||
- name: Generate version
|
||||
id: version
|
||||
run: |
|
||||
echo '{' > build_info.json
|
||||
echo " \"version\": \"${GITHUB_SHA}\"" >> build_info.json
|
||||
echo '}' >> build_info.json
|
||||
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: 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
|
||||
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --name ${{ env.APP_NAME }} main.py
|
||||
@@ -114,16 +129,6 @@ jobs:
|
||||
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
|
||||
run: |
|
||||
mkdir -p release
|
||||
|
||||
Reference in New Issue
Block a user