Skip to content

Update .wordlist.txt #6

Update .wordlist.txt

Update .wordlist.txt #6

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version from tag
id: set_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "::set-output name=version::$VERSION"
- name: Install PowerShell
run: |
sudo apt-get update
sudo apt-get install -y powershell
- name: Create output paths
run: |
mkdir -p ./.github/workflows/bin/temp
mkdir -p ./.github/workflows/bin/markdown
mkdir -p ./.github/workflows/bin/html
mkdir -p ./.github/workflows/bin/pdf
- name: Run PowerShell script
shell: pwsh
run: |
./scripts/Merge-MarkdownFiles.ps1
- name: Fix logo
run: |
sed -i '/!\[\](images\/qlcplus\.svg)/d' ./.github/workflows/bin/markdown/qlcplus-docs.md
- name: Install ImageMagick for image normalization
run: sudo apt-get install -y imagemagick
- name: Normalize image DPI
run: |
for file in ./images/*.{jpg,jpeg,png,tiff,bmp}; do
if [[ -f "$file" ]]; then
convert "$file" -units PixelsPerInch -density 96 "$file"
echo "Processed $file"
fi
done
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Fetch Latest Release
id: get_release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Set the token for GitHub CLI authentication
run: |
RELEASE=$(gh release view --json tagName --jq .tagName)
echo "LATEST_RELEASE=$RELEASE" >> $GITHUB_ENV
- name: Put current date into a variable
run: |
echo "EXPORT_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
- name: Build PDF
uses: docker://pandoc/extra
with:
args: >
-s -o ./.github/workflows/bin/temp/QLCplusDocumentation.pdf
./.github/workflows/bin/markdown/qlcplus-docs.md
--listings
--pdf-engine=lualatex
-V papersize=a4
-V geometry:margin=1.5cm
-V classoption=oneside
-V indent=false
-V toc=true
-V toc-title="Table of Contents"
-V mainfont="Source Sans Pro"
-V sansfont="Source Sans Pro"
-f markdown-raw_tex
- name: Create Title Page Markdown
run: |
echo '![​](images/qlcplus.svg){ style="width: 50%; margin: auto;" }' >> ./.github/workflows/bin/temp/titlepage.md
- name: Convert Title Page to PDF
uses: docker://pandoc/extra
with:
args: >
-s -o ./.github/workflows/bin/temp/titlepage.pdf
./.github/workflows/bin/temp/titlepage.md
--pdf-engine=lualatex
--template=./scripts/template.tex
--verbose
-V mainfont="Source Sans Pro"
-V sansfont="Source Sans Pro"
-V title="Q Light Controller + Documentation"
-V subtitle="Comprehensive Guide"
-V author="docs.qlcplus.org"
-V date="${{env.EXPORT_DATE}}"
-V release="${{env.LATEST_RELEASE}}"
- name: Combine Title Page and Documentation PDFs
run: |
sudo apt-get update
sudo apt-get install -y ghostscript
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=./.github/workflows/bin/pdf/qlcplus-docs.pdf ./.github/workflows/bin/temp/titlepage.pdf ./.github/workflows/bin/temp/QLCplusDocumentation.pdf
echo "rm -d /.github/workflows/bin/temp/"
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: QLC+ ${{ steps.set_version.outputs.version }}
tag_name: ${{ github.ref }}
body: |
##
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload pdf artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./.github/workflows/bin/pdf/qlcplus-docs.pdf
asset_name: qlcplus-docs.pdf
asset_content_type: application/pdf