Skip to content

normalize executable name to execute it in the next step #80

normalize executable name to execute it in the next step

normalize executable name to execute it in the next step #80

Workflow file for this run

# Example: https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions
name: build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
env:
# Run the executable in test and debug mode.
TEST: 1
QT_DEBUG_PLUGINS: 1
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
# https://github.com/Nuitka/Nuitka/issues/2138#issuecomment-1498994385
# https://doc.qt.io/qt-6/linux-requirements.html
- name: Install system dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt install --yes \
libegl-dev \
libfontconfig1-dev \
libfreetype6-dev \
libx11-dev \
libx11-xcb-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxrender-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libatspi2.0-dev \
'^libxcb.*-dev'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build executable with pyinstaller
run: python -m PyInstaller joplin_sticky_notes.spec --noconfirm
- name: Release
uses: softprops/action-gh-release@v2
# release only if there is a release tag
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
files: ./dist/joplin-sticky-notes*
- name: Normalize executable name
# this is needed, because wildcards aren't expanded in the following action
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
copy ./dist/joplin-sticky-notes* ./dist/joplin-sticky-notes
else
cp ./dist/joplin-sticky-notes* ./dist/joplin-sticky-notes
fi
shell: bash
- name: Run the executable (smoke test)
uses: coactions/setup-xvfb@v1
with:
run: ./dist/joplin-sticky-notes