Skip to content

feat: MacOS ARM and PHP 8.2 #1

feat: MacOS ARM and PHP 8.2

feat: MacOS ARM and PHP 8.2 #1

Workflow file for this run

name: Windows build
on:
pull_request:
push:
tags:
- '*'
jobs:
x86_64:
name: PHP ${{ matrix.php-version }} ${{ matrix.arch }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.1"]
arch: ["x64"]
max-parallel: 4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download PHP Cli
id: php_cli
run: |
gh run download 6218251110 -R hyperf/lwmbs -n cli_${{ matrix.php-version }}_${{ matrix.arch }}_78ee8c86ed905c0569e22a6b2e2f46f25ec097c6ae2bfc53c8e790cf2d8c0b21
ls -File
- name: Download Composer
id: composer
run: |
curl -o composer.phar https://getcomposer.org/download/2.3.7/composer.phar
- name: Vendor Installation
id: vendor_installation
run: |
cd src
../php ../composer.phar install -o
- name: Create ~/.box folder
id: create_folder
run: |
cd ~
mkdir .box
- name: Build Box
id: box
continue-on-error: true
run: |
./php src/bin/hyperf.php config set github.access-token ${{ env.GITHUB_TOKEN }}
./php src/bin/hyperf.php config set-php-version ${{ matrix.php-version }}
./php src/bin/hyperf.php build-prepare
./php src/bin/hyperf.php build-self --no-dev
mv ~/.box/box.exe ./box.exe
./box.exe version
- name: Upload artifact for box
if: steps.box.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: box_${{ matrix.arch }}.exe
path: |
box.exe
- name: Fail if box build failed
if: steps.box.outcome != 'success'
run: |
false
steps:
- name: Get release
id: get_release
uses: bruceadams/[email protected]
continue-on-error: true
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
if: steps.box.outcome == 'success' && steps.get_release.outputs.upload_url
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./box.exe
asset_name: box_${{ matrix.arch }}_windows.exe
asset_content_type: application/x-sh