LAAG1/.circleci/config.yml
Valentin Boettcher 441a33b5c8 Typo
2017-12-22 18:50:07 +01:00

33 lines
1.6 KiB
YAML

version: 2
jobs:
build:
docker:
- image: ablu/ubuntu-texlive-full
steps:
- run:
name: Install Dependencies
command: |
apt-get update && apt-get --assume-yes install jq texlive-lang-german curl
- checkout
- run: cp .latexmkrc ~/.latexmkrc
- run:
name: Generating current version
command: |
latexmk Lineare_Algebra.tex;
sed -e 's/%--//g' Lineare_Algebra.tex > Condensed.tex
latexmk Condensed.tex
mkdir /tmp/artifacts;
cp Lineare_Algebra.pdf /tmp/artifacts/
cp Condensed.pdf /tmp/artifacts/
- run:
name: Publish to Releases
command: |
VERSION=$CIRCLE_BUILD_NUM
API_JSON=$(printf '{"tag_name": "v%s","target_commitish": "master","name": "v%s","body": "Skript Entwurf Nr. %s","draft": false,"prerelease": false}' $VERSION $VERSION $VERSION)
UPLOAD_URL=$(curl --data "$API_JSON" https://api.github.com/repos/vale981/LAAG1/releases?access_token=$TOKEN | jq -r '.upload_url')
echo $UPLOAD_URL
curl -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.manifold-preview" -H "Content-Type: application/pdf" --data-binary @/tmp/artifacts/Lineare_Algebra.pdf "$UPLOAD_URL=Lineare_Algebra.pdf"
curl -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.manifold-preview" -H "Content-Type: application/pdf" --data-binary @/tmp/artifacts/Condensed.pdf "$UPLOAD_URL=Condensed.pdf"
- store_artifacts:
path: /tmp/artifacts