Skip to content

Commit 1a84fb6

Browse files
job fix
1 parent f0fbffe commit 1a84fb6

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/release-pr.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,7 @@ jobs:
3232
- run: yarn install --immutable
3333

3434
- name: Changelog for ${{ matrix.package }}
35-
run: |
36-
echo "## ${{ matrix.package }}" >> $GITHUB_STEP_SUMMARY
37-
TAG=$(git describe --abbrev=0 --match "release-v*")
38-
if [ $? -ne 0 ]; then
39-
echo "No release tag matching pattern 'release-v*' found. Generating changelog from beggining"
40-
yarn conventional-changelog -k ${{ matrix.package }} --commit-path ${{ matrix.package }} >> $GITHUB_STEP_SUMMARY
41-
else
42-
echo "Release tag found. Generating changelog from $TAG"
43-
yarn conventional-changelog --tag-prefix="release-v" -k ${{ matrix.package }} --commit-path ${{ matrix.package }} >> $GITHUB_STEP_SUMMARY
44-
fi
35+
run: bash scripts/generate_changelog.sh ${{ matrix.package }} $GITHUB_STEP_SUMMARY
4536

4637
version-check:
4738
name: Version Check

scripts/generate_changelog.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
PACKAGE= $1
2+
echo "## $PACKAGE" >> $2
3+
4+
TAG=$(git describe --abbrev=0 --match "release-v*")
5+
if [ $? -ne 0 ]; then
6+
echo "No release tag matching pattern 'release-v*' found. Generating changelog from beggining"
7+
yarn conventional-changelog -k $PACKAGE --commit-path $PACKAGE >> $2
8+
else
9+
echo "Release tag found. Generating changelog from $TAG"
10+
yarn conventional-changelog --tag-prefix="release-v" -k $PACKAGE --commit-path $PACKAGE >> $2
11+
fi

0 commit comments

Comments
 (0)