mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
Use versioned spc-bin and latest spc-bin
This commit is contained in:
22
.github/workflows/release-build.yml
vendored
22
.github/workflows/release-build.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
|||||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: "Cache Composer dependencies"
|
- name: "Cache Composer dependencies"
|
||||||
uses: "actions/cache@v4"
|
uses: "actions/cache@v5"
|
||||||
with:
|
with:
|
||||||
path: "${{ steps.composer-cache.outputs.dir }}"
|
path: "${{ steps.composer-cache.outputs.dir }}"
|
||||||
key: "php-${{ env.PHP_VERSION }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
|
key: "php-${{ env.PHP_VERSION }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
|
||||||
@@ -120,16 +120,28 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: dist/${{ matrix.operating-system.filename }}
|
files: dist/${{ matrix.operating-system.filename }}
|
||||||
|
|
||||||
- name: "Deploy to self-hosted OSS"
|
- name: "Deploy to self-hosted OSS (latest)"
|
||||||
# only run this step if the repository is static-php-cli and the branch is main
|
# only run this step if the repository is static-php-cli and is release tag
|
||||||
if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
|
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
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 }}
|
||||||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws_bucket: ${{ secrets.AWS_BUCKET }}
|
aws_bucket: ${{ secrets.AWS_BUCKET }}
|
||||||
source_dir: "dist/"
|
source_dir: "dist/"
|
||||||
destination_dir: static-php-cli/spc-bin/nightly/
|
destination_dir: v3/spc-bin/latest/
|
||||||
|
endpoint: ${{ secrets.AWS_ENDPOINT }}
|
||||||
|
|
||||||
|
- name: "Deploy to self-hosted OSS (versioned)"
|
||||||
|
# only run this step if the repository is static-php-cli and is release tag
|
||||||
|
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: static-php/upload-s3-action@v1.0.0
|
||||||
|
with:
|
||||||
|
aws_key_id: ${{ secrets.AWS_KEY_ID }}
|
||||||
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws_bucket: ${{ secrets.AWS_BUCKET }}
|
||||||
|
source_dir: "dist/"
|
||||||
|
destination_dir: v3/spc-bin/${{ github.ref_name }}/
|
||||||
endpoint: ${{ secrets.AWS_ENDPOINT }}
|
endpoint: ${{ secrets.AWS_ENDPOINT }}
|
||||||
|
|
||||||
- name: "Upload Artifact"
|
- name: "Upload Artifact"
|
||||||
|
|||||||
10
README-zh.md
10
README-zh.md
@@ -35,15 +35,15 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# For Linux x86_64
|
# For Linux x86_64
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-linux-x86_64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-linux-x86_64
|
||||||
# For Linux aarch64
|
# For Linux aarch64
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-linux-aarch64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-linux-aarch64
|
||||||
# macOS x86_64 (Intel)
|
# macOS x86_64 (Intel)
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-macos-x86_64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-macos-x86_64
|
||||||
# macOS aarch64 (Apple)
|
# macOS aarch64 (Apple)
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-macos-aarch64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-macos-aarch64
|
||||||
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
|
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
|
||||||
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-release/latest/spc-windows-x64.exe
|
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/latest/spc-windows-x64.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
对于 macOS 和 Linux,请先添加可执行权限:
|
对于 macOS 和 Linux,请先添加可执行权限:
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -35,15 +35,15 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# For Linux x86_64
|
# For Linux x86_64
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-linux-x86_64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-linux-x86_64
|
||||||
# For Linux aarch64
|
# For Linux aarch64
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-linux-aarch64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-linux-aarch64
|
||||||
# macOS x86_64 (Intel)
|
# macOS x86_64 (Intel)
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-macos-x86_64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-macos-x86_64
|
||||||
# macOS aarch64 (Apple)
|
# macOS aarch64 (Apple)
|
||||||
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-release/latest/spc-macos-aarch64
|
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/latest/spc-macos-aarch64
|
||||||
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
|
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
|
||||||
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-release/latest/spc-windows-x64.exe
|
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/latest/spc-windows-x64.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
For macOS and Linux, add execute permission first:
|
For macOS and Linux, add execute permission first:
|
||||||
|
|||||||
Reference in New Issue
Block a user