-
-
Notifications
You must be signed in to change notification settings - Fork 6
123 lines (106 loc) · 4.42 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: test
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run build
- run: mkdir -p build
- run: npm i markdown-to-html-cli -g
- run: markdown-to-html --output build/index.html --github-corners https://github.com/jaywcjlove/changelog-generator
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: build/CONTRIBUTORS.svg
avatarSize: 42
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./package.json
- name: Generate Changelog
id: changelog
# uses: jaywcjlove/changelog-generator@main
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
original-markdown: true
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- run: echo "outputs.changelog - ${{ steps.changelog.outputs.changelog }}"
- run: echo "outputs.tag - ${{ steps.changelog.outputs.tag }}"
- run: echo "outputs.branch - ${{ steps.changelog.outputs.branch }}"
- run: echo "outputs.compareurl - ${{ steps.changelog.outputs.compareurl }}"
- run: echo "outputs.version - ${{ steps.changelog.outputs.version }}"
- run: echo "outputs.gh-pages-hash - ${{ steps.changelog.outputs.gh-pages-hash }}"
- run: echo "outputs.gh-pages-hash - ${{ steps.changelog.outputs['gh-pages-hash'] }}"
- run: echo "outputs.gh-pages-short-hash - ${{ steps.changelog.outputs.gh-pages-short-hash }}"
- name: Generate Changelog (path test)
id: changelog_path
# uses: jaywcjlove/changelog-generator@main
uses: ./
with:
path: ./.github/workflows/changelog.yml
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
original-markdown: true
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Generate Changelog (show-emoji test)
# uses: jaywcjlove/changelog-generator@main
id: changelogEmoji
uses: ./
with:
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
show-emoji: false
remove-type: true
- name: Generate Changelog (outputs.changelog)
run: echo "${{ steps.changelogEmoji.outputs.changelog }}"
- name: Generate Changelog(main)
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (小弟调调™|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Generate Changelog(custom-emoji test)
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (小弟调调™|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
custom-emoji: 'type🐝,feat💄,fix🆎'
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
```yml
- name: Generate changelog
id: changelog
uses: jaywcjlove/changelog-generator@${{ steps.create_tag.outputs.version }}
with:
token: # Your GITHUB_TOKEN
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
```
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
Document Website: https://raw.githack.com/jaywcjlove/changelog-generator/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html