rename builds

This commit is contained in:
cwilvx
2025-01-31 15:12:32 +03:00
parent b511092759
commit 0ad5e0073e
2 changed files with 23 additions and 12 deletions
+20 -12
View File
@@ -7,10 +7,10 @@ on:
description: "Tag" description: "Tag"
required: true required: true
default: "1.x.x" default: "1.x.x"
skip_binary_build: binary_build:
description: "Skip binary build" description: "Build platform binaries"
required: true required: true
default: "false" default: "true"
type: choice type: choice
options: options:
- true - true
@@ -18,7 +18,7 @@ on:
is_latest: is_latest:
description: "Set as latest" description: "Set as latest"
required: true required: true
default: "true" default: "false"
type: choice type: choice
options: options:
- true - true
@@ -32,10 +32,10 @@ on:
- true - true
- false - false
build_docker: build_docker:
description: "Release Docker image" description: "Build Docker image"
required: true required: true
type: choice type: choice
default: "false" default: "true"
options: options:
- true - true
- false - false
@@ -45,7 +45,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019] os: [ubuntu-20.04, windows-2019]
if: ${{ github.event.inputs.skip_binary_build == 'false' }} if: ${{ github.event.inputs.binary_build == 'false' }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: Create binary on ${{ matrix.os }} name: Create binary on ${{ matrix.os }}
steps: steps:
@@ -96,17 +96,25 @@ jobs:
python manage.py --build python manage.py --build
env: env:
SWINGMUSIC_APP_VERSION: ${{ inputs.tag }} SWINGMUSIC_APP_VERSION: ${{ inputs.tag }}
- name: Rename Linux binary
if: matrix.os == 'ubuntu-20.04'
run: |
mv dist/swingmusic dist/swingmusic_linux_amd64
- name: Rename Windows binary
if: matrix.os == 'windows-2019'
run: |
mv dist/swingmusic.exe dist/swingmusic_win32.exe
- name: Verify Linux build success - name: Verify Linux build success
if: matrix.os == 'ubuntu-20.04' if: matrix.os == 'ubuntu-20.04'
run: | run: |
if [ ! -f "./dist/swingmusic" ]; then if [ ! -f "./dist/swingmusic_linux_amd64" ]; then
echo "Build failed" echo "Build failed"
exit 1 exit 1
fi fi
- name: Verify Windows build success - name: Verify Windows build success
if: matrix.os == 'windows-2019' if: matrix.os == 'windows-2019'
run: | run: |
if (-not (Test-Path "./dist/swingmusic.exe")) { if (-not (Test-Path "./dist/swingmusic_win32.exe")) {
Write-Host "Build failed" Write-Host "Build failed"
exit 1 exit 1
} }
@@ -115,14 +123,14 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: linux name: linux
path: dist/swingmusic path: dist/swingmusic_linux_amd64
retention-days: 1 retention-days: 1
- name: Upload Windows binary - name: Upload Windows binary
if: matrix.os == 'windows-2019' if: matrix.os == 'windows-2019'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: win32 name: win32
path: dist/swingmusic.exe path: dist/swingmusic_win32.exe
retention-days: 1 retention-days: 1
build_aarch64: build_aarch64:
@@ -160,7 +168,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: arm64 name: arm64
path: root/swingmusicbuilder/swingmusic/dist/swingmusic path: root/swingmusicbuilder/swingmusic/dist/swingmusic_linux_arm64
retention-days: 1 retention-days: 1
release: release:
+3
View File
@@ -43,3 +43,6 @@ poetry install
# Swing gives error if this is not set. Set to version of repo you cloned. # Swing gives error if this is not set. Set to version of repo you cloned.
export SWINGMUSIC_APP_VERSION="TAG" export SWINGMUSIC_APP_VERSION="TAG"
poetry run python manage.py --build poetry run python manage.py --build
# rename binary
mv dist/swingmusic dist/swingmusic_linux_arm64