File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Generate Release Notes PR
2+
3+ on :
4+ pull_request :
5+ workflow_dispatch :
6+
7+ env :
8+ REPO_NAME : migration-planner
9+
10+ permissions :
11+ contents : write
12+ pull-requests : write
13+
14+ jobs :
15+ release-notes :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout repo
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+ token : ${{ secrets.GITHUB_TOKEN }}
24+
25+ - name : Setup Node
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : 20
29+
30+ - name : Install gren
31+ run : npm install -g github-release-notes
32+
33+ - name : Get latest tag
34+ id : tag
35+ env :
36+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+ run : |
38+ # Use the variable via env context
39+ TAG=$(gh api repos/kubev2v/migration-planner/tags --jq '.[0].name')
40+ echo "tag=$TAG" >> $GITHUB_OUTPUT
41+
42+ - name : Generate release notes to file
43+ env :
44+ GREN_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ run : |
46+ # Use the variable via env context
47+ gren release \
48+ --repo migration-planner \
49+ > release-notes.md
50+
51+ - name : Create Pull Request
52+ uses : peter-evans/create-pull-request@v8
53+ with :
54+ base : main
55+ branch : release-notes
56+ commit-message : |
57+ Update release notes
58+ title : " [AUTOMATION] Update release notes"
59+ delete-branch : true
You can’t perform that action at this time.
0 commit comments