Skip to content

Commit

Permalink
fix: generate changelog error on github actions
Browse files Browse the repository at this point in the history
Signed-off-by: inhere <in.798@qq.com>
  • Loading branch information
inhere committed Aug 9, 2021
1 parent ba36641 commit 639d20b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ jobs:
- name: Generate changelog
if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '7.4' }}
run: |
echo "changelog list by git"
git status && git log -1 && git fetch --tags --prune --unshallow --force
git describe --abbrev=0 --tags
lastTag=$(git describe --abbrev=0 --tags) && git log $lastTag...HEAD --pretty=format:"%H | %s" --no-merges --reverse
echo "::group::changelog list by kite"
php bin/kite git chlog last head --style gh-release --no-merges --fetch-tags --file tmp/changelog.md
echo "changelog list by kite"
php bin/kite git chlog last head --style gh-release --no-merges --fetch-tags --unshallow --file tmp/changelog.md
cat tmp/changelog.md
echo "::endgroup::"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
git status
php bin/kite git info
php bin/kite gh cl prev $RELEASE_TAG --style gh-release --no-merges --fetch-tags --file tmp/changelog-${RELEASE_TAG}.md
php bin/kite gh cl prev $RELEASE_TAG --style gh-release --no-merges --fetch-tags --unshallow --file tmp/changelog-${RELEASE_TAG}.md
cat tmp/changelog-${RELEASE_TAG}.md
# https://github.com/meeDamian/github-release
Expand Down
7 changes: 7 additions & 0 deletions resource/refer/git-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
echo "changelog list by git"
#git status && git log -1 && git fetch --tags --prune --unshallow --force
git status
git log -1
git fetch --tags --prune --unshallow --force
git describe --abbrev=0 --tags
lastTag=$(git describe --abbrev=0 --tags) && git log "$lastTag"...HEAD --pretty=format:"%H | %s" --no-merges --reverse

0 comments on commit 639d20b

Please sign in to comment.