mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix spc build actions version, add spc validation
This commit is contained in:
parent
085abd635e
commit
b0c93c7418
41
.github/workflows/release-build.yml
vendored
41
.github/workflows/release-build.yml
vendored
@ -3,6 +3,10 @@ name: Build SPC Binary
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/release-build.yml'
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
@ -10,7 +14,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: 8.4
|
PHP_VERSION: 8.4
|
||||||
MICRO_VERSION: 8.4.10
|
MICRO_VERSION: 8.4.11
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release-artifacts:
|
build-release-artifacts:
|
||||||
@ -117,7 +121,8 @@ jobs:
|
|||||||
files: dist/${{ matrix.operating-system.filename }}
|
files: dist/${{ matrix.operating-system.filename }}
|
||||||
|
|
||||||
- name: "Deploy to self-hosted OSS"
|
- name: "Deploy to self-hosted OSS"
|
||||||
if: github.repository == 'crazywhalecc/static-php-cli'
|
# only run this step if the repository is static-php-cli and the branch is main
|
||||||
|
if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
|
||||||
uses: static-php/upload-s3-action@v1.0.0
|
uses: static-php/upload-s3-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
aws_key_id: ${{ secrets.AWS_KEY_ID }}
|
aws_key_id: ${{ secrets.AWS_KEY_ID }}
|
||||||
@ -132,3 +137,35 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: spc${{ env.SUFFIX }}
|
path: spc${{ env.SUFFIX }}
|
||||||
name: spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
|
name: spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
|
||||||
|
test-spc:
|
||||||
|
name: "Test SPC Binary for ${{ matrix.operating-system.name }}"
|
||||||
|
runs-on: ${{ matrix.operating-system.os }}
|
||||||
|
needs: [build-release-artifacts]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system:
|
||||||
|
- name: "linux-x86_64"
|
||||||
|
os: "ubuntu-latest"
|
||||||
|
- name: "macos-x86_64"
|
||||||
|
os: "macos-13"
|
||||||
|
- name: "linux-aarch64"
|
||||||
|
os: "ubuntu-24.04-arm"
|
||||||
|
- name: "macos-aarch64"
|
||||||
|
os: "macos-latest"
|
||||||
|
- name: "windows-x64"
|
||||||
|
os: "windows-latest"
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "Download Artifact"
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
env:
|
||||||
|
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
|
||||||
|
with:
|
||||||
|
name: spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
|
||||||
|
|
||||||
|
- name: "Run SPC Tests"
|
||||||
|
env:
|
||||||
|
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
|
||||||
|
run: ./spc${{ env.SUFFIX }} dev:extensions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user