File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Release
2
+
3
+ on :
4
+ push :
5
+ # Sequence of patterns matched against refs/tags
6
+ tags :
7
+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8
+
9
+ jobs :
10
+ build :
11
+ name : Create Release
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Get version from tag
15
+ id : tag_name
16
+ run : |
17
+ echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
18
+ shell : bash
19
+
20
+ - name : Checkout code
21
+ uses : actions/checkout@v2
22
+
23
+ - name : Create Changelog
24
+ uses : heinrichreimer/github-changelog-generator-action@v2.1.1
25
+ with :
26
+ token : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Get Changelog Entry
29
+ id : changelog_reader
30
+ uses : mindsers/changelog-reader-action@v2
31
+ with :
32
+ validation_depth : 10
33
+ version : ${{ steps.tag_name.outputs.current_version }}
34
+ path : ./CHANGELOG.md
35
+
36
+ - name : Create Release
37
+ id : create_release
38
+ uses : actions/create-release@v1
39
+ env :
40
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ with :
42
+ # This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
43
+ # See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
44
+ tag_name : ${{ steps.changelog_reader.outputs.version }}
45
+ release_name : Release ${{ steps.changelog_reader.outputs.version }}
46
+ body : ${{ steps.changelog_reader.outputs.changes }}
47
+ prerelease : ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
48
+ draft : ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
You can’t perform that action at this time.
0 commit comments