Skip to content

Commit

Permalink
Generate an authors.json meta data file
Browse files Browse the repository at this point in the history
  • Loading branch information
norwd authored Oct 15, 2024
1 parent a1ff990 commit b6103d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b6103d7

Please sign in to comment.