Skip to content

Commit f2a5ce5

Browse files
committed
add change log generate on release action
1 parent b8a1fb2 commit f2a5ce5

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252

5353
- name: Generate changelog file
5454
id: changelog
55-
if: ${{ matrix.os == 'ubuntu-latest' }}
55+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '7.4' }}
5656
run: |
57-
wget -c https://github.com/inhere/kite/releases/download/v1.1.9/kite-v1.1.9.phar -O kite.phar
57+
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
5858
php kite.phar git cl last head --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
5959
cat changelog.md
6060

.github/workflows/release.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,12 @@ jobs:
4444
echo "release tag: ${tag1}"
4545
composer update --no-progress
4646
47-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
48-
# Docs: https://getcomposer.org/doc/articles/scripts.md
49-
50-
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
51-
# - name: Generate changelog file
52-
# id: changelog
53-
# run: |
54-
# php bin/kite gh cl prev $RELEASE_TAG --style gh-release --no-merges --fetch-tags --unshallow --file tmp/changelog-${RELEASE_TAG}.md
55-
# cat tmp/changelog-${RELEASE_TAG}.md
56-
57-
# https://github.com/meeDamian/github-release
58-
# - name: Create release and upload assets
59-
# uses: meeDamian/[email protected]
60-
# with:
61-
# gzip: false
62-
# token: ${{ secrets.GITHUB_TOKEN }}
63-
# tag: ${{ env.RELEASE_TAG }}
64-
# name: ${{ env.RELEASE_TAG }}
65-
# body: |
66-
# ${{ steps.changelog.outputs.CHLOGBODY }}
67-
# files: kite-${{ env.RELEASE_TAG }}.phar
47+
- name: Generate changelog file
48+
id: changelog
49+
run: |
50+
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
51+
php kite.phar git cl last head --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
52+
cat changelog.md
6853
6954
# https://github.com/softprops/action-gh-release
7055
- name: Create release and upload assets
@@ -73,7 +58,7 @@ jobs:
7358
with:
7459
name: ${{ env.RELEASE_TAG }}
7560
tag_name: ${{ env.RELEASE_TAG }}
76-
# body_path: tmp/changelog-${{ env.RELEASE_TAG }}.md
61+
body_path: changelog.md
7762
# files: kite-${{ env.RELEASE_TAG }}.phar
7863
env:
7964
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)