Skip to content

Add pypubsub to AppImageBuilder. #242

Add pypubsub to AppImageBuilder.

Add pypubsub to AppImageBuilder. #242

name: Build & Release
on:
push:
tags:
- 'v*' # Push events matching v*, i.e. v1.0, v20.15.10
- '*prerelease*' # prereleases
- '*test*' # test releases
workflow_dispatch:
jobs:
build:
name: Build & Release
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
CMD_BUILD: pyinstaller BindControl.spec
CMD_VERIFY: dir dist/BindControl
CMD_PREZIP: echo
FILE_NAME: BindControl-${{ github.ref_name }}_windows.zip
- os: macos-15-intel
CMD_BUILD: pyinstaller BindControl.spec
CMD_VERIFY: ls -la dist/BindControl.app
CMD_PREZIP: rm -rf dist/BindControl
ZIP_CUSTOM: --symlinks
FILE_NAME: BindControl-${{ github.ref_name }}_macos_intel.zip
- os: macos-15
CMD_BUILD: pyinstaller BindControl.spec
CMD_VERIFY: ls -la dist/BindControl.app
CMD_PREZIP: rm -rf dist/BindControl
ZIP_CUSTOM: --symlinks
FILE_NAME: BindControl-${{ github.ref_name }}_macos_arm64.zip
- os: ubuntu-24.04
CMD_BUILD: pyinstaller BindControl.spec
CMD_VERIFY: ls -la dist/BindControl
ZIP_CUSTOM: --symlinks
FILE_NAME: BindControl-${{ github.ref_name }}_linux.zip
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Cache pip dependencies
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Tools & Dependencies
# The -f URL below should have its ubuntu-xxx version synced with the os: ubuntu-xxx version in the matrix above
run: |
python -m pip install --upgrade pip
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython --user
pip install pyinstaller==6.10.0 -r requirements.txt
pip install pillow
pip install pypubsub
- name: Create Executable
run: |
echo "${{ github.ref_name }}" > version.txt
${{ matrix.CMD_BUILD }}
- name: Verify Files
run: |
${{ matrix.CMD_VERIFY }}
- name: Create Zip Archive
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
# "--symlinks" needed for MacOS and Linux builds
custom: '${{ matrix.ZIP_CUSTOM }}'
directory: './dist'
command: '${{ matrix.CMD_PREZIP }}'
filename: '${{ matrix.FILE_NAME }}'
- name: Upload ZIP Archive
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/${{ matrix.FILE_NAME }}
asset_name: ${{ matrix.FILE_NAME }}
tag: ${{ github.ref }}
overwrite: true
release_name: "BindControl ${{ github.ref_name }}"
body: "${{ github.event.head_commit.message }}"
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'prerelease') }}
make_latest: ${{ !contains(github.ref, 'test') && !contains(github.ref, 'prerelease') }}
- name: Create AppImage File
if: ${{ runner.os == 'Linux' }}
run: |
wget -O appimage-builder-x86_64.AppImage.tar https://github.com/Lord-Kamina/appimage-builder/releases/download/continuous/appimage-builder_x86_64-AppImage.tar
tar xvf appimage-builder-x86_64.AppImage.tar --transform='s/.*\///'
mv appimage-builder-*-x86_64.AppImage appimage-builder-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
VERSION=${{ github.ref_name }} appimage-builder --recipe AppImageBuilder.yml --skip-test
- name: Upload AppImage Files (AppImage and zsync)
if: ${{ runner.os == 'Linux' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: BindControl-${{ github.ref_name }}_linux.AppImage*
file_glob: true
tag: ${{ github.ref }}
overwrite: true
release_name: "BindControl ${{ github.ref_name }}"
body: "${{ github.event.head_commit.message }}"
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'prerelease') }}
make_latest: ${{ !contains(github.ref, 'test') && !contains(github.ref, 'prerelease') }}