Skip to content

Commit bd7e047

Browse files
committed
up: gen changelog on relase new tag
1 parent 2d5708f commit bd7e047

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,26 @@ jobs:
3131
uses: shivammathur/setup-php@v2
3232
with:
3333
php-version: ${{ matrix.php}}
34-
tools: pecl, php-cs-fixer, phpunit
35-
extensions: mbstring, dom, fileinfo, mysql, openssl # , swoole-4.4.19 #optional, setup extensions
34+
tools: php-cs-fixer, phpunit
35+
extensions: mbstring, dom, fileinfo, openssl # , swoole-4.4.19 #optional, setup extensions
3636
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
3737
coverage: none #optional, setup coverage driver: xdebug, none
3838

39-
- name: Install dependencies # eg: v1.0.3
39+
- name: Generate changelog file
40+
id: changelog
4041
run: |
41-
tag1=${GITHUB_REF#refs/*/}
42-
echo "release tag: ${tag1}"
43-
composer install --no-progress
44-
45-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
46-
# Docs: https://getcomposer.org/doc/articles/scripts.md
47-
48-
# - name: Build phar and send to github assets
49-
# run: |
50-
# echo $RELEASE_TAG
51-
# echo $RELEASE_NAME
52-
# php -d phar.readonly=0 bin/kite phar:pack -o kite-${RELEASE_TAG}.phar --no-progress
53-
# php kite-${RELEASE_TAG}.phar -V
54-
55-
# https://github.com/actions/create-release
56-
- uses: meeDamian/[email protected]
42+
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
43+
php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
44+
cat changelog.md
45+
46+
# https://github.com/softprops/action-gh-release
47+
- name: Create release and upload assets
48+
uses: softprops/action-gh-release@v1
49+
# if: startsWith(github.ref, 'refs/tags/')
5750
with:
58-
gzip: false
59-
token: ${{ secrets.GITHUB_TOKEN }}
60-
tag: ${{ env.RELEASE_TAG }}
6151
name: ${{ env.RELEASE_TAG }}
62-
# files: kite-${{ env.RELEASE_TAG }}.phar
52+
tag_name: ${{ env.RELEASE_TAG }}
53+
body_path: changelog.md
54+
# files: kite-${{ env.RELEASE_TAG }}.phar
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)