Skip to content

Commit 228ed69

Browse files
authored
[Actions] Use GitHub actions to automatically generate release notes (#683)
Context: https://github.com/xamarin/java.interop/wiki/Release-Notes Context: https://www.nuget.org/packages/noted Context: https://github.com/jpobst/noted Create a GitHub action that automatically generates draft release notes from merged PR's that contain the label `release-notes`. These release notes are placed on the wiki, along with instructions on how to include a PR and how to format the release note message. This action runs every morning at 06:00 UTC. Once this workflow is committed to `master`, it should also be available to be run manually via the Actions tab: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/.
1 parent b9580da commit 228ed69

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release-notes.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This action runs every day and updates the draft release notes on the wiki
2+
# from comments put on PR's tagged with the `release-notes` label.
3+
name: Update Release Notes
4+
5+
# Runs every day at 06:00 UTC
6+
on:
7+
schedule:
8+
- cron: 0 6 * * *
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out wiki repo
18+
uses: actions/checkout@v2
19+
with:
20+
repository: xamarin/java.interop.wiki
21+
path: wiki
22+
23+
- name: Setup .NET Core
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 3.1.x
27+
28+
- name: Install Noted
29+
run: dotnet tool install -g noted
30+
31+
- name: Run Noted
32+
run: >
33+
noted
34+
--repository-owner xamarin
35+
--repository java.interop
36+
--output-directory ${{ github.workspace }}/wiki
37+
--repository-name Java.Interop
38+
--token ${{ github.token }}
39+
40+
- name: Commit release notes changes
41+
working-directory: ${{ github.workspace }}/wiki
42+
run: |
43+
git config user.email "[email protected]"
44+
git config user.name "Release Notes Bot"
45+
git add -A
46+
git commit -m "Update release notes" || echo "No changes to commit"
47+
git push origin master || echo "No changes to commit"

0 commit comments

Comments
 (0)