From f84a4dd186dc81234ee2ae3c4dcf58bde72a29df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Ho=CC=88chst?= Date: Sun, 2 Feb 2020 18:05:44 +0100 Subject: [PATCH] Added github actions to build PDFs --- .github/workflows/release.yml | 149 ++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..6b4f5918 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,149 @@ +name: "Build Release" + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-18.04 + name: "Build PDFs for all Books" + steps: + - name: "Checkout repository" + uses: actions/checkout@v1 + with: + submodules: recursive + - name: "Install abcm2ps" + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y make gcc libc6-dev + wget https://github.com/leesavide/abcm2ps/archive/v8.14.1.tar.gz -O abcm2ps-8.14.1.tar.gz + tar -xf abcm2ps-8.14.1.tar.gz + cd abcm2ps-8.14.1/ + ./configure + sudo make install + - name: "Install LaTeX and dependencies" + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-extra-utils texlive-lang-german xzdec ghostscript make + - name: "Install songidx" + run: | + tar xf Tools/songs-2.18.tar.gz + pushd songs-2.18/ + ./configure + cd src/songidx + make + popd + cp songs-2.18/src/songidx/songidx Tools/songidx + - run: make Ausgaben/PfadiralalaIV.pdf + - run: make Ausgaben/PfadiralalaIV-pics.pdf + - run: make Ausgaben/PfadiralalaIV-print.pdf + - run: make Noten + - run: make Ausgaben/PfadiralalaIVplus.pdf + - run: make Ausgaben/PfadiralalaIVplus-pics.pdf + - run: make Ausgaben/PfadiralalaIVplus-print.pdf + - run: make Ausgaben/Pfadiralala2020.pdf + - run: make Ausgaben/Pfadiralala2020-pics.pdf + - run: make Ausgaben/Pfadiralala2020-print.pdf + + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: true + + - name: Upload PfadiralalaIV.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIV.pdf + asset_name: PfadiralalaIV.pdf + asset_content_type: application/pdf + + - name: Upload PfadiralalaIV-pics.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIV-pics.pdf + asset_name: PfadiralalaIV-pics.pdf + asset_content_type: application/pdf + + - name: Upload PfadiralalaIV-print.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIV-print.pdf + asset_name: PfadiralalaIV-print.pdf + asset_content_type: application/pdf + + - name: Upload PfadiralalaIVplus.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIVplus.pdf + asset_name: PfadiralalaIVplus.pdf + asset_content_type: application/pdf + + - name: Upload PfadiralalaIVplus-pics.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIVplus-pics.pdf + asset_name: PfadiralalaIVplus-pics.pdf + asset_content_type: application/pdf + + - name: Upload PfadiralalaIVplus-print.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/PfadiralalaIVplus-print.pdf + asset_name: PfadiralalaIVplus-print.pdf + asset_content_type: application/pdf + + - name: Upload Pfadiralala2020.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/Pfadiralala2020.pdf + asset_name: Pfadiralala2020.pdf + asset_content_type: application/pdf + + - name: Upload Pfadiralala2020-pics.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/Pfadiralala2020-pics.pdf + asset_name: Pfadiralala2020-pics.pdf + asset_content_type: application/pdf + + - name: Upload Pfadiralala2020-print.pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Ausgaben/Pfadiralala2020-print.pdf + asset_name: Pfadiralala2020-print.pdf + asset_content_type: application/pdf