Last active
July 31, 2022 22:13
-
-
Save aaronparker/b5383bfb5a1fec9af372596c4051674b to your computer and use it in GitHub Desktop.
Create a release for the Intune as-built
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: Create documentation release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
document-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
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 | |
run: | | |
npm i -g md-to-pdf | |
# Convert markdown document to PDF | |
- name: Convert markdown to PDF | |
shell: bash | |
run: | | |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \ | |
--config-file ./md2pdf/pdfconfig.json | |
# Convert markdown document to PDF | |
- name: Convert markdown to HTML | |
shell: bash | |
run: | | |
md-to-pdf "$GITHUB_WORKSPACE/prod-as-built.md" \ | |
--config-file ./md2pdf/htmlconfig.json --as-html | |
# Import GPG key so that we can sign the commit | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.GPGKEY }} | |
passphrase: ${{ secrets.GPGPASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_config_global: true | |
git_tag_gpgsign: true | |
git_push_gpgsign: false | |
git_committer_name: ${{ secrets.COMMIT_NAME }} | |
git_committer_email: ${{ secrets.COMMIT_EMAIL }} | |
# Upload release | |
- name: Upload release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
prerelease: false | |
files: | | |
prod-as-built.pdf | |
prod-as-built.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment