-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (50 loc) · 1.56 KB
/
intune-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Create documentation release
on:
push:
tags:
- "v*.*.*"
jobs:
document-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
# Install md-to-pdf
# https://github.com/simonhaenisch/md-to-pdf
- name: Install md-to-pdf
shell: bash
working-directory: "${{ github.workspace }}"
run: |
npm i -g md-to-pdf
# Convert markdown document to PDF
- name: Convert markdown to PDF
shell: bash
working-directory: "${{ github.workspace }}"
run: |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \
--md-file-encoding utf-8 \
--config-file ./md2pdf/pdfconfig.json
# Convert markdown document to PDF
- name: Convert markdown to HTML
shell: bash
working-directory: "${{ github.workspace }}"
run: |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \
--md-file-encoding utf-8 \
--config-file ./md2pdf/htmlconfig.json --as-html
# Zip the pdf and html documents
- name: Zip documents
shell: bash
working-directory: "${{ github.workspace }}"
run : |
zip -q -9 prod-as-built.zip prod-as-built.*
# Upload release
- name: Upload release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: false
files: |
${{ github.workspace }}/prod-as-built.zip