Skip to content

Commit 57f7fbb

Browse files
committedJan 13, 2023
ci: update the release action script
1 parent 3674b03 commit 57f7fbb

File tree

3 files changed

+36
-42
lines changed

3 files changed

+36
-42
lines changed
 

‎.github/changelog.yml

+30-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1-
options:
2-
title: '## Change Log'
3-
style: gh-release
1+
title: '## Change Log'
2+
# style allow: simple, markdown(mkdown), ghr(gh-release)
3+
style: gh-release
4+
# group names
5+
names: [Refactor, Fixed, Feature, Update, Other]
6+
# if empty will auto fetch by git remote
7+
#repo_url: https://github.com/gookit/gitw
8+
49
filters:
5-
# message length >= 12
6-
- name: msgLen
7-
minLen: 12
8-
# message words >= 3
9-
- name: wordsLen
10-
minLen: 3
10+
# message length should >= 12
11+
- name: msg_len
12+
min_len: 12
13+
# message words should >= 3
14+
- name: words_len
15+
min_len: 3
16+
- name: keyword
17+
keyword: format code
18+
exclude: true
1119
- name: keywords
12-
keywords: ['format code']
20+
keywords: format code, action test
1321
exclude: true
1422

23+
# group match rules
1524
# not matched will use 'Other' group.
16-
groups:
17-
- name: New
18-
keywords: [add, new]
25+
rules:
26+
- name: Refactor
27+
start_withs: [refactor, break]
28+
contains: ['refactor:']
1929
- name: Fixed
20-
startWiths: [add, new]
21-
keywords: [add, new]
22-
- name: Feat
23-
startWiths: [feat]
24-
keywords: [feature]
30+
start_withs: [fix]
31+
contains: ['fix:']
32+
- name: Feature
33+
start_withs: [feat, new]
34+
contains: ['feat:']
2535
- name: Update
26-
startWiths: [update, 'up:']
27-
keywords: [update]
36+
start_withs: [update]
37+
contains: ['update:', 'up:']

‎.github/workflows/php.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
php: [8.0, 8.1] # 7.3, 7.4,
18+
php: [8.0, 8.1, 8.2] # 7.3, 7.4,
1919
# os: [ubuntu-latest] # windows-latest,
2020
# include:
2121
# - os: 'ubuntu-latest'

‎.github/workflows/release.yml

+5-21
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@ on:
77

88
jobs:
99
release:
10-
name: Test on php ${{ matrix.php}}
10+
name: New tag release
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
13-
strategy:
14-
fail-fast: true
15-
matrix:
16-
php: [8.0]
1713

1814
steps:
1915
- name: Checkout
@@ -25,23 +21,11 @@ jobs:
2521
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
2622
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
2723
28-
# usage refer https://github.com/shivammathur/setup-php
29-
- name: Setup PHP
30-
timeout-minutes: 5
31-
uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: ${{ matrix.php}}
34-
tools: php-cs-fixer, phpunit
35-
extensions: mbstring, dom, fileinfo, openssl # , swoole-4.4.19 #optional, setup extensions
36-
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
37-
coverage: none #optional, setup coverage driver: xdebug, none
38-
39-
- name: Generate changelog file
40-
id: changelog
24+
- name: Generate changelog
4125
run: |
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
26+
curl https://github.com/gookit/gitw/releases/latest/download/chlog-linux-amd64 -L -o /usr/local/bin/chlog
27+
chmod a+x /usr/local/bin/chlog
28+
chlog -c .github/changelog.yml -o changelog.md prev last
4529
4630
# https://github.com/softprops/action-gh-release
4731
- name: Create release and upload assets

0 commit comments

Comments
 (0)
Please sign in to comment.