From ed94497e826eb76459597cd3007b3926b21eb8de Mon Sep 17 00:00:00 2001 From: Matt Firth Date: Wed, 20 Mar 2024 12:52:31 +0000 Subject: [PATCH] Generate PDFs on CI (#274) --- .github/workflows/build.yml | 39 ++++++++++++++++++++++++++++++++++- packaging/release_process.txt | 2 -- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cf358f1..fbf59b80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,38 @@ on: - '*' jobs: + gendocs: + name: Generate PDF Documents + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Generate readme.md from readme.md.in + shell: cmake -P {0} + run: | + file(READ CHANGELOG.md CHANGELOG ENCODING UTF-8) + configure_file(packaging/README.md.in packaging/README.md @ONLY) + + - name: Generate PDFs + uses: baileyjm02/markdown-to-pdf@v1 + with: + input_dir: packaging + output_dir: packaging/pdfs + build_html: false + + - name: Upload PDFs + uses: actions/upload-artifact@v2 + with: + name: pdfs + path: packaging/pdfs + build: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} + needs: gendocs env: CCACHE_WIN_VERSION: 4.2.1 CCACHE_DIR: ${{ github.workspace }}/.ccache @@ -72,7 +101,15 @@ jobs: with: submodules: recursive fetch-depth: 0 - + + - name: Download generated PDFs + uses: actions/download-artifact@v2 + with: + name: 'pdfs' + path: packaging + - name: Display structure of downloaded files + run: ls packaging + - name: 'Install ninja-build tool.' uses: seanmiddleditch/gha-setup-ninja@v3 diff --git a/packaging/release_process.txt b/packaging/release_process.txt index fbd2fa59..da44dc4a 100644 --- a/packaging/release_process.txt +++ b/packaging/release_process.txt @@ -4,8 +4,6 @@ Merge all changes in to main Update ./CHANGELOG.md Update version in ./CMakeLists.txt and ./vcpkg.json Update ./packaging/README.md.in (version number and summary) -Rerun Configure and Generate in CMake (forces recreation of README.md in build directory from template) -Regenerate PDFs by building target "generate-package-docs" (project files must have been generated with CMake variable EPS_BUILD_PACKAGE=ON) Commit all, and push Tag it with version (e.g, git tag -a v0.8.0-EPS-beta -m "v0.8.0 beta release") Push tag (e.g, git push origin v0.8.0-EPS-beta)