Skip to content

Commit 02c683d

Browse files
committed
up: add auto gen changelog on release new tag
1 parent a499593 commit 02c683d

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,22 @@ jobs:
4242
echo "release tag: ${tag1}"
4343
composer install --no-progress --no-suggest
4444
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/github-release@2.0
45+
- name: Generate changelog file
46+
id: changelog
47+
run: |
48+
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
49+
php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
50+
cat changelog.md
51+
52+
# https://github.com/softprops/action-gh-release
53+
- name: Create release and upload assets
54+
uses: softprops/action-gh-release@v1
55+
# if: startsWith(github.ref, 'refs/tags/')
5756
with:
58-
gzip: false
59-
token: ${{ secrets.GITHUB_TOKEN }}
60-
tag: ${{ env.RELEASE_TAG }}
6157
name: ${{ env.RELEASE_TAG }}
62-
# files: kite-${{ env.RELEASE_TAG }}.phar
58+
tag_name: ${{ env.RELEASE_TAG }}
59+
body_path: changelog.md
60+
# files: kite-${{ env.RELEASE_TAG }}.phar
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
# GITHUB_REPOSITORY: my_gh_org/my_gh_repo

src/File.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
use function stream_get_contents;
3333
use function stream_get_meta_data;
3434
use function stream_set_blocking;
35-
use function strlen;
3635
use function trim;
3736

3837
/**
@@ -51,10 +50,6 @@ class File extends FileSystem
5150

5251
public const FORMAT_INI = 'ini';
5352

54-
public const FORMAT_YML = 'yml';
55-
56-
public const FORMAT_YAML = 'yaml';
57-
5853
/**********************************************************************************
5954
* config file load
6055
*********************************************************************************/

0 commit comments

Comments
 (0)