Skip to content

fix(release): correct file paths for executable artifacts #5

fix(release): correct file paths for executable artifacts

fix(release): correct file paths for executable artifacts #5

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build Release
runs-on: ${{ matrix.os }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
- name: Install system dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y python3-pyqt6 python3-pyqt6.qtcharts
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt || {
echo "Some dependencies failed, trying without cx_Oracle (optional)..."
pip install PyQt6 PyQt6-Charts psycopg2-binary pymysql aiosqlite pymongo redis pyodbc clickhouse-driver influxdb-client boto3 google-api-python-client google-auth-httplib2 google-auth-oauthlib cryptography pynacl python-dotenv schedule paramiko pandas numpy matplotlib Pillow ldap3 pyotp qrcode azure-identity azure-mgmt-sql || echo "Dependency installation completed with some failures"
}
pip install build pyinstaller
- name: Build Python package
run: python -m build
- name: Build Windows executable
if: matrix.os == 'windows-latest'
run: |
pyinstaller --clean --noconfirm --onefile --windowed --name "DB_Storage_Manager" --icon=NONE db_storage_manager/main.py || {
pyinstaller --clean --noconfirm --onefile --name "DB_Storage_Manager" db_storage_manager/main.py || echo "Windows executable build attempted"
}
mkdir -p release
if [ -f "dist/DB_Storage_Manager.exe" ]; then
cp dist/DB_Storage_Manager.exe release/DB_Storage_Manager-v1.0.1.exe || echo "Windows executable copied"
fi
shell: bash
- name: Build macOS app bundle
if: matrix.os == 'macos-latest'
run: |
pyinstaller --clean --noconfirm --windowed --name "DB Storage Manager" --osx-bundle-identifier com.voxhash.db-storage-manager pyinstaller.spec || {
pyinstaller --clean --noconfirm --name "DB_Storage_Manager" --onefile db_storage_manager/main.py || echo "macOS build attempted"
}
mkdir -p release
if [ -d "dist/DB Storage Manager.app" ]; then
cp -r "dist/DB Storage Manager.app" release/ || echo "App bundle copied"
elif [ -f "dist/DB_Storage_Manager" ]; then
cp dist/DB_Storage_Manager release/DB_Storage_Manager-v1.0.1 || echo "macOS executable copied"
fi
- name: Create macOS DMG
if: matrix.os == 'macos-latest'
run: |
if [ -d "release/DB Storage Manager.app" ]; then
hdiutil create -volname "DB Storage Manager" -srcfolder "release/DB Storage Manager.app" -ov -format UDZO release/DB_Storage_Manager-v1.0.1.dmg || echo "DMG creation attempted"
elif [ -f "release/DB_Storage_Manager" ]; then
mkdir -p "release/DB Storage Manager.app/Contents/MacOS"
cp release/DB_Storage_Manager "release/DB Storage Manager.app/Contents/MacOS/DB Storage Manager"
hdiutil create -volname "DB Storage Manager" -srcfolder "release/DB Storage Manager.app" -ov -format UDZO release/DB_Storage_Manager-v1.0.1.dmg || echo "DMG creation attempted"
fi
- name: Build Linux AppImage
if: matrix.os == 'ubuntu-latest'
run: |
pyinstaller --clean --noconfirm --name "DB_Storage_Manager" --onefile db_storage_manager/main.py || echo "Linux build attempted"
mkdir -p release
if [ -f "dist/DB_Storage_Manager" ]; then
cp dist/DB_Storage_Manager release/DB_Storage_Manager-v1.0.1.AppImage || echo "Linux executable prepared"
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: |
dist/
release/
publish:
name: Publish Release
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
needs: build
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/ubuntu-latest/dist/*.whl
dist/ubuntu-latest/dist/*.tar.gz
dist/ubuntu-latest/release/*
dist/windows-latest/dist/*.whl
dist/windows-latest/dist/*.tar.gz
dist/windows-latest/release/*.exe
dist/macos-latest/dist/*.whl
dist/macos-latest/dist/*.tar.gz
dist/macos-latest/release/*.dmg
dist/macos-latest/release/*.app
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}