Skip to content

Thread identification (#123) #396

Thread identification (#123)

Thread identification (#123) #396

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
env:
doc_name: cheri-architecture
jobs:
build:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Basic checks
run: pip install pre-commit && pre-commit run --all-files --show-diff-on-failure --color=always
- name: Install latex
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make texlive-plain-generic texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-science texlive-fonts-recommended texlive-fonts-extra texlive-bibtex-extra texlive-extra-utils biber latexmk
- name: Build document
run: make
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: ${{ env.doc_name }}.pdf
path: ${{ env.doc_name }}.pdf
draft-release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: [ubuntu-latest]
steps:
- name: Download artifact
uses: actions/download-artifact@master
with:
name: ${{ env.doc_name }}.pdf
path: ./
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: draft-${{ steps.date.outputs.date }}-${{ github.sha }}
release_name: Draft release ${{ steps.date.outputs.date }}
body: Latest snapshot (${{ github.sha }})
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./${{ env.doc_name }}.pdf
asset_name: ${{ env.doc_name }}-snapshot-${{ github.sha }}.pdf
asset_content_type: application/pdf