mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-14 18:56:52 +00:00
- safely migrate historical Bashrc and Log2RAM installations - align post-install function versions across both flows - bundle gevent runtimes for CPython 3.11 and 3.13 - select the correct Python ABI at runtime - validate both supported Proxmox VE Python versions in AppImage workflows - fix #327, #328 and #331
101 lines
3.2 KiB
YAML
101 lines
3.2 KiB
YAML
name: Build AppImage Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout main
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: main
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
working-directory: AppImage
|
|
run: npm install --legacy-peer-deps
|
|
|
|
- name: Build Next.js app
|
|
working-directory: AppImage
|
|
run: npm run build
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3 python3-pip python3-venv
|
|
|
|
- name: Make build script executable
|
|
working-directory: AppImage
|
|
run: chmod +x scripts/build_appimage.sh
|
|
|
|
- name: Build AppImage
|
|
working-directory: AppImage
|
|
run: ./scripts/build_appimage.sh
|
|
|
|
- name: Set up Python 3.11 validation runtime
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Verify bundled Python 3.11 runtime
|
|
env:
|
|
PYTHONPATH: /tmp/proxmenux_build/ProxMenux.AppDir/usr/lib/python3/vendor/cp311:/tmp/proxmenux_build/ProxMenux.AppDir/usr/lib/python3/dist-packages
|
|
run: python -c 'import gevent, greenlet, geventwebsocket, zope.interface; from gevent import pywsgi; print(gevent.__version__)'
|
|
|
|
- name: Set up Python 3.13 validation runtime
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Verify bundled Python 3.13 runtime
|
|
env:
|
|
PYTHONPATH: /tmp/proxmenux_build/ProxMenux.AppDir/usr/lib/python3/vendor/cp313:/tmp/proxmenux_build/ProxMenux.AppDir/usr/lib/python3/dist-packages
|
|
run: python -c 'import gevent, greenlet, geventwebsocket, zope.interface; from gevent import pywsgi; print(gevent.__version__)'
|
|
|
|
- name: Get version from package.json
|
|
id: version
|
|
working-directory: AppImage
|
|
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
|
|
- name: Generate SHA256 checksum
|
|
run: |
|
|
cd AppImage/dist
|
|
sha256sum *.AppImage > ProxMenux-Monitor.AppImage.sha256
|
|
echo "Generated SHA256:"
|
|
cat ProxMenux-Monitor.AppImage.sha256
|
|
|
|
- name: Upload AppImage artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ProxMenux-${{ steps.version.outputs.VERSION }}-AppImage
|
|
path: |
|
|
AppImage/dist/*.AppImage
|
|
AppImage/dist/*.sha256
|
|
retention-days: 30
|
|
|
|
- name: Commit AppImage to main
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
rm -f AppImage/*.AppImage AppImage/*.sha256 || true
|
|
cp AppImage/dist/*.AppImage AppImage/
|
|
cp AppImage/dist/ProxMenux-Monitor.AppImage.sha256 AppImage/
|
|
|
|
git add AppImage/*.AppImage AppImage/*.sha256
|
|
git commit -m "Update AppImage release build ($(date +'%Y-%m-%d %H:%M:%S'))" || echo "No changes to commit"
|
|
git push origin main
|