File tree Expand file tree Collapse file tree 3 files changed +30
-10
lines changed
Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 7474 shell : bash
7575 - name : Get notes
7676 id : generate_notes
77- uses : mckrava/standard-version-release-notes@master
77+ uses : mckrava/standard-version-release-notes@v1.1.0
7878 with :
7979 tag_name : ${{ github.ref }}
80+ tag_name_ref_view : true
8081 changelog : CHANGELOG.md
8182 - name : Create Release
8283 id : create_release
@@ -93,13 +94,15 @@ jobs:
9394
9495## Input Variables
9596
96- | Name | Description | Default |
97- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
98- | ` tag_name` | Name of the tag whose release notes we are looking for | - |
99- | `changelog` | Path to changelog file | - |
97+ | Name | Description | Default |
98+ | ------------------- | ------------------------------------------------------ | ------- |
99+ | ` tag_name` | Name of the tag whose release notes we are looking for | - |
100+ | `changelog` | Path to changelog file | - |
101+ | `tag_name_prefix` | Tag name prefix | "v" |
102+ | `tag_name_ref_view` | Does tag name have such view as `refs/tags/{tag_name}` | false |
100103
101104# # Output Variables
102105
103- | Name | Description | Default |
104- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- ------- |
105- | `notes` | Serialized dictionary as string containing the `notes` key which hosts the list of lines that hold data for the aforementioned tag | - |
106+ | Name | Description | Default |
107+ | ------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------- |
108+ | `notes` | Serialized dictionary as string containing the `notes` key which hosts the list of lines that hold data for the aforementioned tag | - |
Original file line number Diff line number Diff line change @@ -2,11 +2,19 @@ name: 'Get Release Notes from standard-version changelog'
22description : ' Get release notes for Changelog from standatd-version'
33inputs :
44 tag_name :
5- description : " Name of the tag whose release notes we are looking for (must have structure 'refs/tags/{tag_name}')"
5+ description : " Name of the tag whose release notes we are looking for (can have structure either 'refs/tags/{tag_name}' or 'tag_name ')"
66 required : true
77 changelog :
88 description : " Path to changelog file to be parsed"
99 required : true
10+ tag_name_prefix :
11+ description : " Tag name prefix"
12+ required : false
13+ default : " v"
14+ tag_name_ref_view :
15+ description : " Tag name 'refs' structure or exact tag name ('refs/tags/vX.X.X' or 'vX.X.X')"
16+ required : false
17+ default : " false"
1018outputs :
1119 notes :
1220 description : " The serialized dict of the notes. Access the notes from the notes key of the dict"
Original file line number Diff line number Diff line change 33import re
44
55
6- TAG_NAME = os .getenv ("INPUT_TAG_NAME" ).split ("refs/tags/" )[1 ]
6+ TAG_NAME = os .getenv ("INPUT_TAG_NAME" )
7+ TAG_NAME_PREFIX = os .getenv ("INPUT_TAG_NAME_PREFIX" )
8+ TAG_NAME_REF_VIEW = os .getenv ("INPUT_TAG_NAME_REF_VIEW" )
79PATH_TO_CHANGELOG = os .getenv ("INPUT_CHANGELOG" )
810
11+ if TAG_NAME_REF_VIEW == "true" :
12+ TAG_NAME = TAG_NAME .split ("refs/tags/" )[1 ]
13+
14+ # We need remove prefix because changelog contains version headers without prefix
15+ if TAG_NAME_PREFIX != '' :
16+ TAG_NAME = TAG_NAME .replace (TAG_NAME_PREFIX , '' , 1 )
17+
918
1019def get_changelog_lines ():
1120 """
You can’t perform that action at this time.
0 commit comments