Skip to content

Manual Check and Build #3

Manual Check and Build

Manual Check and Build #3

name: Manual Check and Build
on:
workflow_dispatch:
inputs:
pythonVersion:
description: 'Python version to use for the processing'
required: true
default: '3.8'
type: choice
options:
- 3.7
- 3.8
- 3.9
- 3.10
- 3.11
buildLevel:
description: 'Build languages'
required: true
default: 'English only'
type: choice
options:
- English only
- All supported languages
env:
if: startsWith(inputs.buildLevel, 'All')
MY_BUILD_ARG: -l all
jobs:
lint_rst_and_basic_build:
name: Check with LintRST and Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.pythonVersion }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.pythonVersion }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint Test RST Files
run: python ./setup.py test rst
- name: Setup for Build
run: |
export SPHINXBUILD=`which sphinx-build`
mkdir _build
mkdir docs
- name: Build Tag Map Files
run: |
python ./setup.py build map
- name: Store Tag Map Build Output File
uses: actions/upload-artifact@v4
with:
name: tag_map_files
path: docs/MusicBrainz_Picard_Tag_Map.*
retention-days: 5
- name: Update Translation Files
run: |
python ./setup.py build pot
- name: Build HTML Files - ${{ inputs.buildLevel }}
run: |
python ./setup.py clean html
python ./setup.py ${{ env.MY_BUILD_ARG }} build html
- name: Store HTML Build Output File
uses: actions/upload-artifact@v2
with:
name: html_files
path: docs/*.zip
retention-days: 5
- name: Build EPUB File - ${{ inputs.buildLevel }}
run: |
python ./setup.py clean epub
python ./setup.py ${{ env.MY_BUILD_ARG }} build epub
- name: Store ePub Build Output File
uses: actions/upload-artifact@v4
with:
name: epub_file
path: docs/*.epub
retention-days: 5
- name: Install LaTeX dependencies
run: |
sudo apt-get update
sudo apt-get install latexmk
sudo apt-get install xzdec
sudo apt-get install texlive
sudo apt-get install texlive-fonts-extra
sudo apt-get install texlive-latex-extra
sudo apt-get install texlive-luatex
sudo apt-get install xindy
- name: Build PDF File - ${{ inputs.buildLevel }}
run: |
python ./setup.py clean pdf
python ./setup.py ${{ env.MY_BUILD_ARG }} build pdf
- name: Store PDF Build Output File
uses: actions/upload-artifact@v4
with:
name: pdf_file
path: docs/*.pdf
retention-days: 5
- name: Display Variables Passed to Publish Action
run: |
cat docs/__init__.py