-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate release notes when source files change
- Loading branch information
1 parent
85f4c21
commit f2b5d81
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |