From b6103d78d8df79c72f2ba7f4355b7319aa26c948 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:19:10 +1300 Subject: [PATCH] Generate an authors.json meta data file --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bacbc14..32f767d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,12 @@ jobs: MEDIA_TYPE_HEADER: "Accept: application/vnd.github.raw" AUTH_TOKEN_HEADER: "Authorization: Bearer ${{ github.token }}" + - name: "Generate an authors.json file" + run: gh api "${ENDPOINT}" --jq "${JQ_QUERY}" | tee authors.json + env: + ENDPOINT: '/repos/${{ github.repository }}/contributors' + JQ_QUERY: '{ authors: [ .[].login ] }' + - name: "Generate a changelog.md file" run: gh api "${ENDPOINT}" --template "${TEMPLATE}" | tee changelog.md env: @@ -68,7 +74,7 @@ jobs: rm -f header.html %.html: %.md - pandoc --template=GitHub.html5 --include-in-header=header.html --from markdown+yaml_metadata_block+backtick_code_blocks+fenced_code_attributes+inline_notes+emoji --to html --standalone $< --output $@ + pandoc --metadata-file=authors.json --template=GitHub.html5 --include-in-header=header.html --from markdown+yaml_metadata_block+backtick_code_blocks+fenced_code_attributes+inline_notes+emoji --to html --standalone $< --output $@ EOF