Skip to content

Commit 00b6a92

Browse files
committed
feat: add GitHub Actions workflow to generate authors and mailmap on PR merge
1 parent a83b2ae commit 00b6a92

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/generate.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Generate Authors and Mailmap on PR Merge
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
10+
jobs:
11+
generate-authors-mailmap:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout the repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '16'
22+
23+
- name: Run the script to generate authors file and mailmap
24+
run: |
25+
npm run generate
26+
27+
- name: Commit and push changes
28+
run: |
29+
git config --global user.name "GitHub Actions"
30+
git config --global user.email "[email protected]"
31+
git add AUTHORS.md .mailMap
32+
git commit -m "Generate authors and mailmap"
33+
git push origin HEAD
34+
35+
- name: Create a pull request
36+
uses: peter-evans/create-pull-request@v4
37+
with:
38+
title: "Update authors and mailmap"
39+
body: "This PR updates the authors file and mailmap."
40+
base: main
41+
head: "generate-authors-mailmap"

0 commit comments

Comments
 (0)