From e96c7889e2b6a32e51ef367bb7b31863513ef5dd Mon Sep 17 00:00:00 2001 From: Hugo Slepicka Date: Fri, 3 May 2024 22:44:06 -0300 Subject: [PATCH] CI: Add manual release workflow. (#946) --- .github/workflows/release-docs.yml | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/release-docs.yml diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml new file mode 100644 index 0000000000..054768204b --- /dev/null +++ b/.github/workflows/release-docs.yml @@ -0,0 +1,53 @@ +name: Bmad Ecosystem - Release Documentation + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + build: + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + matrix: + os: [ubuntu-latest] + steps: + # Check out the code from GitHub and all history + - uses: actions/checkout@v3 + + - name: Define Release Name + id: release_name + run: | + git fetch --prune --unshallow --tags + # call .github/scripts/next_version.sh to get the next version + # and set it as an output variable + echo "Next version: $(.github/scripts/next_version.sh)" + echo "version=$(.github/scripts/next_version.sh)" >> $GITHUB_OUTPUT + + - name: Install dependencies + run: | + sudo apt update + sudo apt install texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-full texlive-science + + - name: Build Bmad PDF Manual for Release - ${{ steps.release_name.outputs.version }} + run: | + cd ${GITHUB_WORKSPACE}/bmad/doc/ + pdflatex bmad.tex + ./makeindex.pl + + - name: Build Tao PDF Manual for Release - ${{ steps.release_name.outputs.version }} + run: | + cd ${GITHUB_WORKSPACE}/tao/doc/ + pdflatex tao.tex + ./makeindex.pl + + - name: Upload Release Assets - Bmad & Tao Manual + run: | + gh release upload ${{github.event.release.tag_name}} ${GITHUB_WORKSPACE}/tao/doc/bmad.pdf ${GITHUB_WORKSPACE}/tao/doc/tao.pdf + env: + GITHUB_TOKEN: ${{ github.TOKEN }}