Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 74a9075

Browse files
committed
up: update the php and release action
1 parent 14d623d commit 74a9075

File tree

3 files changed

+51
-32
lines changed

3 files changed

+51
-32
lines changed

‎.github/changelog.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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/goutil
8+
9+
filters:
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
19+
- name: keywords
20+
keywords: format code, action test
21+
exclude: true
22+
23+
# group match rules
24+
# not matched will use 'Other' group.
25+
rules:
26+
- name: Refactor
27+
start_withs: [refactor, break]
28+
contains: ['refactor:']
29+
- name: Fixed
30+
start_withs: [fix]
31+
contains: ['fix:']
32+
- name: Feature
33+
start_withs: [feat, new]
34+
contains: [feature, 'feat:']
35+
- name: Update
36+
start_withs: [up]
37+
contains: ['update:', 'up:']

‎.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
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.1] # 7.3, 7.4,
1919
os: [ubuntu-latest, macOS-latest] # windows-latest,
2020
# include:
2121
# - os: 'ubuntu-latest'

‎.github/workflows/release.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,38 @@ on:
77

88
jobs:
99
release:
10-
name: Test on php ${{ matrix.php}}
10+
name: Release new version
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
1313
strategy:
1414
fail-fast: true
15-
matrix:
16-
php: [8.0]
1715

1816
steps:
1917
- name: Checkout
20-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
2121

22-
- name: Set ENV for github-release
22+
- name: Setup ENV
2323
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
2424
run: |
2525
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
2626
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
2727
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: pecl, php-cs-fixer, phpunit
35-
extensions: mbstring, dom, fileinfo, mysql, 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: Install dependencies # eg: v1.0.3
40-
run: |
41-
tag1=${GITHUB_REF#refs/*/}
42-
echo "release tag: ${tag1}"
43-
composer install --no-progress
44-
45-
# more see https://github.com/inhere/kite
46-
- name: Generate changelog file
47-
id: changelog
28+
- name: Generate changelog
4829
run: |
49-
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
50-
php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
51-
cat changelog.md
30+
curl https://github.com/gookit/gitw/releases/latest/download/chlog-linux-amd64 -L -o /usr/local/bin/chlog
31+
chmod a+x /usr/local/bin/chlog
32+
chlog -c .github/changelog.yml -o changelog.md prev last
5233
5334
# https://github.com/softprops/action-gh-release
5435
- name: Create release and upload assets
5536
uses: softprops/action-gh-release@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5639
with:
5740
name: ${{ env.RELEASE_TAG }}
5841
tag_name: ${{ env.RELEASE_TAG }}
5942
body_path: changelog.md
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
# GITHUB_REPOSITORY: my_gh_org/my_gh_repo
43+
token: ${{ secrets.GITHUB_TOKEN }}
44+
# files: macos-chlog.exe

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /