chore: update required php verion >8.1 #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag-release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
release: | |
name: Test on php ${{ matrix.php}} | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set ENV for github-release | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable | |
run: | | |
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV | |
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV | |
# usage refer https://github.com/shivammathur/setup-php | |
- name: Setup PHP | |
timeout-minutes: 5 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php}} | |
tools: pecl, php-cs-fixer | |
extensions: mbstring, dom, fileinfo, mysql, openssl # , swoole-4.4.19 #optional, setup extensions | |
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration | |
coverage: none #optional, setup coverage driver: xdebug, none | |
- name: Install dependencies # eg: v1.0.3 | |
run: | | |
tag1=${GITHUB_REF#refs/*/} | |
echo "release tag: ${tag1}" | |
composer install --no-progress | |
- name: Generate changelog file | |
id: changelog | |
run: | | |
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar | |
php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md | |
cat changelog.md | |
# https://github.com/softprops/action-gh-release | |
- name: Create release and upload assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ env.RELEASE_TAG }} | |
tag_name: ${{ env.RELEASE_TAG }} | |
body_path: changelog.md | |
# files: kite-${{ env.RELEASE_TAG }}.phar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |