104 lines
2.6 KiB
YAML
104 lines
2.6 KiB
YAML
name: Build
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
buildAssets:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Python Setup
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3
|
|
architecture: x64
|
|
|
|
- name: Install Packages (apt)
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install qttools5-dev-tools latexmk texlive texlive-latex-extra
|
|
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Packages (pip)
|
|
run: pip install -r docs/source/requirements.txt
|
|
|
|
- name: Build Assets
|
|
run: python pkgutils.py qtlrelease sample manual
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nw-assets
|
|
path: |
|
|
novelwriter/assets/sample.zip
|
|
novelwriter/assets/manual.pdf
|
|
novelwriter/assets/i18n/*.qm
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
buildLinux:
|
|
needs: buildAssets
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.11"]
|
|
linux-tag: ["manylinux_2_24_x86_64", "manylinux_2_28_x86_64"]
|
|
steps:
|
|
- name: Python Setup
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3
|
|
architecture: x64
|
|
|
|
- name: Install Packages (pip)
|
|
run: pip install python-appimage
|
|
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: nw-assets
|
|
path: novelwriter/assets
|
|
|
|
- name: Build AppImage
|
|
run: python pkgutils.py build-appimage --linux-tag ${{ matrix.linux-tag }} --python-version ${{ matrix.python-version }}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: novelWriter-Packages
|
|
path: |
|
|
dist_appimage/novelWriter*.AppImage
|
|
dist_appimage/novelWriter*.AppImage.sha256
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
buildMac:
|
|
needs: buildAssets
|
|
runs-on: macos-12
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: nw-assets
|
|
path: novelwriter/assets
|
|
|
|
- name: Build App Bundle
|
|
run: ./setup/macos/build.sh
|
|
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: novelWriter-Packages
|
|
path: |
|
|
dist_macos/novelWriter*.dmg
|
|
dist_macos/novelWriter*.dmg.sha256
|
|
if-no-files-found: error
|
|
retention-days: 1
|