Skip to content

User Guide

User Guide #54

Workflow file for this run

name: User Guide
on:
push:
tags:
- 'v*'
jobs:
pdf:
runs-on: ubuntu-20.04
steps:
- name: install deps
run: |
sudo apt update
sudo apt install git pandoc texlive-latex-recommended texlive-latex-extra
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Strip ref to tag
id: tag_name
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=$(echo $GITHUB_REF | cut -d/ -f3)" >> $GITHUB_OUTPUT
- name: clone wiki
run: |
git clone --depth 1 --branch ${{ steps.tag_name.outputs.VERSION }} https://github.com/ctc-oss/fapolicy-analyzer.wiki
- name: append version number
run: |
echo "" >> User-Guide.md
echo "---" >> User-Guide.md
echo "File Access Policy Analyzer version ${{ steps.tag_name.outputs.VERSION }}" >> User-Guide.md
working-directory: fapolicy-analyzer.wiki
- name: generate pdf
run: |
tag=${{ steps.tag_name.outputs.VERSION }}
tag_version="${tag#v}"
pandoc -V CJKmainfont="KaiTi" User-Guide.md -o fapolicy-analyzer-user-guide-${tag_version}.pdf
working-directory: fapolicy-analyzer.wiki
- name: release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_name.outputs.VERSION }}
prerelease: ${{ startsWith(github.ref, 'refs/tags/v0') || contains(github.ref, 'rc') }}
draft: true
files: |
fapolicy-analyzer.wiki/fapolicy-analyzer-user-guide-*.pdf