build(deps): bump actions/download-artifact in /.github/workflows #406
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: [push] | |
jobs: | |
build: | |
name: Build specification document | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v1 | |
- name: Install packages | |
run: | | |
sudo apt update | |
sudo apt install -y -o Acquire::Retries=50 \ | |
software-properties-common | |
sudo add-apt-repository -y ppa:lyx-devel/release | |
sudo apt install -y -o Acquire::Retries=50 \ | |
lyx cm-super texlive-latex-extra python3-pygments \ | |
make gcc libssl-dev asn1c librsvg2-bin | |
- name: Configure LyX | |
run: | | |
mkdir ~/.lyx | |
echo "[shell escape files]" > ~/.lyx/session | |
echo "$(pwd)/spec/cx.lyx,1" >> ~/.lyx/session | |
echo "Format 24" > ~/.lyx/preferences | |
echo '\converter "svg" "pdf6" ' \ | |
'"rsvg-convert -f pdf -o $$o $$r/$$f" ""' \ | |
>> ~/.lyx/preferences | |
- name: Check for release version | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
run: | | |
echo "::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\/v/}" | |
- name: Build and test | |
run: | | |
make -C spec VERSION=${RELEASE_VERSION} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: cx.pdf | |
path: spec/cx.pdf | |
- name: Create release | |
id: create_release | |
if: env.RELEASE_VERSION | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Version ${{ env.RELEASE_VERSION }} | |
draft: false | |
prerelease: false | |
- name: Upload release assets | |
if: env.RELEASE_VERSION | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: spec/cx.pdf | |
asset_name: cx.pdf | |
asset_content_type: application/pdf |