LAAG1/.circleci/config.yml

30 lines
1.2 KiB
YAML
Raw Normal View History

2017-11-24 18:38:55 +01:00
version: 2
jobs:
2017-11-24 18:43:05 +01:00
build:
docker:
2017-11-24 18:42:13 +01:00
- image: ablu/ubuntu-texlive-full
2017-11-24 18:43:05 +01:00
steps:
2017-11-24 18:52:01 +01:00
- run:
name: Install Dependencies
command: |
2017-11-24 18:56:42 +01:00
apt-get update && apt-get --assume-yes install jq texlive-lang-german curl
2017-11-24 18:43:05 +01:00
- checkout
- run: cp .latexmkrc ~/.latexmkrc
- run:
name: Generating current version
command: |
latexmk Lineare_Algebra.tex;
mkdir /tmp/artifacts;
cp Lineare_Algebra.pdf /tmp/artifacts/
2017-11-24 18:12:20 +01:00
- run:
name: Publish to Releases
command: |
2017-11-24 18:18:33 +01:00
VERSION=$CIRCLE_BUILD_NUM
2017-11-24 18:12:20 +01:00
API_JSON=$(printf '{"tag_name": "v%s","target_commitish": "master","name": "v%s","body": "Another Build %s","draft": false,"prerelease": false}' $VERSION $VERSION $VERSION)
2017-11-24 18:35:42 +01:00
UPLOAD_URL=$(curl --data "$API_JSON" https://api.github.com/repos/vale981/LAAG1/releases?access_token=$TOKEN | jq '.assets_url')
2017-11-24 18:19:57 +01:00
echo $UPLOAD_URL
2017-11-24 18:39:12 +01:00
curl -H "Authorization: $TOKEN" -H "Accept: application/vnd.github.manifold-preview" -H "Content-Type: application/pdf" --data-binary /tmp/artifacts/Lineare_Algebra.pdf "$UPLOAD_URL?name=Lineare_Algebra.pdf"
2017-11-24 18:12:20 +01:00
2017-11-24 18:43:05 +01:00
- store_artifacts:
path: /tmp/artifacts