File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,28 @@ jobs:
2424 id : parse-changelog
2525 uses : alleyinteractive/action-changelog-extractor@develop
2626
27- - name : Dump changelog output
27+ - name : Extract latest version from CHANGELOG.md
2828 run : |
2929 echo "Changelog Output:"
30- echo "parse-changelog: ${{ fromJson(steps.parse-changelog.outputs.result)[0].name }}"
30+ LATEST_VERSION="${{ fromJson(steps.parse-changelog.outputs.result)[0].name }}"
31+
32+ if [ -z "$LATEST_VERSION" ]; then
33+ echo "No version found in changelog extractor output."
34+ exit 1
35+ fi
36+
37+ echo "Latest version from changelog extractor: $LATEST_VERSION"
38+ echo "version=v$LATEST_VERSION" >> $GITHUB_ENV
39+
3140 exit 1
3241
33- - name : Extract latest version from CHANGELOG.md
34- id : get_version
35- run : |
36- VERSION=$(grep -oP '(?<=## v)\d+\.\d+\.\d+' CHANGELOG.md | head -1)
37- echo "Latest version found: $VERSION"
38- echo "version=v$VERSION" >> $GITHUB_ENV
42+
43+ # - name: Extract latest version from CHANGELOG.md
44+ # id: get_version
45+ # run: |
46+ # VERSION=$(grep -oP '(?<=## v)\d+\.\d+\.\d+' CHANGELOG.md | head -1)
47+ # echo "Latest version found: $VERSION"
48+ # echo "version=v$VERSION" >> $GITHUB_ENV
3949
4050 - name : Get latest GitHub release
4151 id : latest_release
You can’t perform that action at this time.
0 commit comments