Add draft of SEP_V026 #135
This file contains hidden or 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: build_specification | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| release: | |
| types: [ created ] | |
| jobs: | |
| build_latex: | |
| runs-on: ubuntu-latest | |
| needs: build_sampler | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: | | |
| npm install markdown-pdf | |
| sudo apt install git-restore-mtime | |
| - name: Reset file modification times | |
| run: git restore-mtime | |
| - name: Generate PDFs for glyphs | |
| run: python3 scripts/rebuild_glyphs.py | |
| - name: Generate tex file for examples appendix | |
| run: | | |
| cd scripts | |
| python3 generate_examples_appendix.py | |
| - name: Compile LaTeX document | |
| uses: dante-ev/latex-action@v0.2.0 | |
| with: | |
| working_directory: specification | |
| root_file: sbolvisual.tex | |
| - name: Move PDF | |
| run: mkdir -p output && cp specification/sbolvisual.pdf output | |
| - name: Upload PDF as build artifact | |
| uses: actions/upload-artifact@v1.0.0 | |
| with: | |
| name: PDF | |
| path: output | |
| - if: github.event_name == 'release' | |
| name: Upload PDF as release artifact | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: output/sbolvisual.pdf | |
| - if: ${{ github.event_name == 'push' }} | |
| name: Commit glyph PDFs, ready to push | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add specification/glyphscript/Glyphs/ | |
| git diff-index --quiet HEAD specification/glyphscript/Glyphs/ || git commit -m "Automatically update PDFs for individual glyphs" | |
| - name: Push changes | |
| if: ${{ github.event_name == 'push' }} | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| build_sampler: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v1 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install libcairo2-dev build-essential python3-setuptools | |
| cd scripts | |
| pip3 install -r requirements.txt | |
| - name: Build samplers | |
| run: python3 scripts/generate_sampler.py | |
| - name: Upload samplers as artifact | |
| uses: actions/upload-artifact@v1.0.0 | |
| with: | |
| name: samplers | |
| path: sampler | |
| - name: Commit sampler file | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add sampler/ | |
| git diff-index --quiet HEAD || git commit -m "Automatically re-generate sampler" | |
| - name: Push changes | |
| if: ${{ github.event_name == 'push' }} | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compress samplers | |
| run: zip -j samplers sampler/* | |
| - if: github.event_name == 'release' | |
| name: Upload sampler as release artifact | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: samplers.zip | |
| build_glph_zipfiles: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v1 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install libcairo2-dev build-essential python3-setuptools | |
| cd scripts | |
| pip3 install -r requirements.txt | |
| - name: Make directories | |
| run: | | |
| mkdir -p glyph_collections/svg | |
| mkdir -p glyph_collections/pdf | |
| mkdir -p glyph_collections/png | |
| - name: Make collections of glyphs | |
| run: python3 scripts/collate_glyphs.py | |
| - name: Upload zipfile of SVGs | |
| uses: actions/upload-artifact@v1.0.0 | |
| with: | |
| name: SVG Glyphs | |
| path: glyph_collections/svg | |
| - name: Upload zipfile of PDFs | |
| uses: actions/upload-artifact@v1.0.0 | |
| with: | |
| name: PDF Glyphs | |
| path: glyph_collections/pdf | |
| - name: Upload zipfile of PNGs | |
| uses: actions/upload-artifact@v1.0.0 | |
| with: | |
| name: PNG Glyphs | |
| path: glyph_collections/png | |
| - if: github.event_name == 'release' | |
| name: Compress glyphs | |
| run: | | |
| zip -j glyphs-svg glyph_collections/svg/* | |
| zip -j glyphs-pdf glyph_collections/pdf/* | |
| zip -j glyphs-png glyph_collections/png/* | |
| - if: github.event_name == 'release' | |
| name: Upload glyphs as release artifact | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: | | |
| glyphs-svg.zip | |
| glyphs-pdf.zip | |
| glyphs-png.zip |