Skip to content

wip

wip #184

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build PDF
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
branches:
- master
tags:
- 'v*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: winitzki/sofp-docker-build:latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build PDF using make_sofp_pdf.sh
id: full-pdf
uses: docker://winitzki/sofp-docker-build:latest
with:
args: "LYXDIR=/root/.lyx bash sofp-src/make_sofp_pdf.sh"
- name: Upload built PDF
id: upload-pdf
uses: actions/upload-artifact@v2
with:
name: PDF files and LaTeX logs
path: |
./sofp-src/sofp*.pdf
./sofp-src/sofp*-3page-cover.pdf
./sofp-src/sofp-logs.tar.bz2
if-no-files-found: error
- name: Create new release
if: contains(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true
- name: Upload sofp.pdf
if: contains(github.ref, 'refs/tags/v')
id: upload-sofp
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sofp-src/sofp.pdf
asset_name: sofp.pdf
asset_content_type: application/pdf
- name: Upload sofp-10pt.pdf
if: contains(github.ref, 'refs/tags/v')
id: upload-sofp-10pt
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sofp-src/sofp-10pt.pdf
asset_name: sofp-10pt.pdf
asset_content_type: application/pdf
- name: Upload sofp-vol1.pdf
if: contains(github.ref, 'refs/tags/v')
id: upload-sofp-vol1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sofp-src/sofp-vol1.pdf
asset_name: sofp-vol1.pdf
asset_content_type: application/pdf
- name: Upload sofp-3page-cover.pdf
if: contains(github.ref, 'refs/tags/v')
id: upload-sofp-cover
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sofp-src/book_cover/sofp-3page-cover.pdf
asset_name: sofp-3page-cover.pdf
asset_content_type: application/pdf
- name: Upload sofp-vol1-3page-cover.pdf
if: contains(github.ref, 'refs/tags/v')
id: upload-sofp-vol1-cover
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sofp-src/sofp-vol1-3page-cover.pdf
asset_name: sofp-vol1-3page-cover.pdf
asset_content_type: application/pdf