mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
update workflows
This commit is contained in:
parent
16f2db3f28
commit
c283a84263
68
.github/workflows/build-release-artifacts.yml
vendored
Normal file
68
.github/workflows/build-release-artifacts.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
name: Build Release Artifacts
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-release-artifacts:
|
||||
name: Build Release Artifacts
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ubuntu-latest
|
||||
use-cache: true
|
||||
|
||||
- name: Build Phar
|
||||
run: ./zhamao build
|
||||
|
||||
- name: Get Latest Release Upload URL
|
||||
id: get-latest-release
|
||||
run: curl https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.upload_url' | sed 's/{?name,label}//g' > upload_url.txt
|
||||
|
||||
- name: Upload Phar
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
$(cat upload_url.txt)/zm.phar \
|
||||
--data-binary "@build/zm.phar"
|
||||
|
||||
update-changelog:
|
||||
name: Update Changelog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ubuntu-latest
|
||||
use-cache: true
|
||||
|
||||
- name: Update Changelog
|
||||
run: ./zhamao generate:text update-log-md
|
||||
|
||||
- name: Commit Changelog
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: update changelog
|
||||
branch: ${{ github.base_ref }}
|
||||
10
.github/workflows/increment-build-number.yml
vendored
10
.github/workflows/increment-build-number.yml
vendored
@ -47,6 +47,16 @@ jobs:
|
||||
commit_message: update api docs
|
||||
branch: ${{ github.base_ref }}
|
||||
|
||||
- name: Update Class Aliases Docs
|
||||
run: ./zhamao generate:text class-alias-md
|
||||
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.changed_files, 'src/Globals/global_class_alias.php') }}
|
||||
|
||||
- name: Commit Class Aliases Docs
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: update class aliases docs
|
||||
branch: ${{ github.base_ref }}
|
||||
|
||||
- name: Increment build number
|
||||
id: increment-build-number
|
||||
run: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user