Skip to content

Commit

Permalink
Generate release notes when source files change
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-heyer committed Dec 11, 2024
1 parent 85f4c21 commit f2b5d81
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/generate-release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: generate release notes
on:
pull_request:
types: [opened, synchronize]
paths:
- "**/src/*.yml"
- "**/src/*.yaml"
jobs:
release-notes:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
path: content
sparse-checkout: |
advocacy_docs
product_docs
- name: Checkout relgen tool
uses: actions/checkout@v4
with:
ref: develop
path: tools
sparse-checkout: |
tools
- name: setup node
uses: actions/setup-node@v4

- name: install dependencies
run: npm --prefix ./tools/tools/automation/generators/relgen ci

# TODO: limit this to paths that have actually *changed*
- name: regenerate relnotes
run: |
shopt -s globstar
for rnmetapath in ./content/**/src/meta.yml; do
./tools/tools/automation/generators/relgen/relgen.js -p ${rnmetapath%/src/meta.yml}
done
- name: commit modified files
run: |
cd ./content
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "update generated release notes"
git push

0 comments on commit f2b5d81

Please sign in to comment.