forked from amphp/ext-uv
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.86 KB
/
Apple-macOS-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# GitHub Action for PHP with extensions
name: Apple macOS Release
on:
release:
types: [published, edited]
jobs:
apple:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [macos-10.15, macos-11, macos-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
tools: pecl
extensions: curl, fileinfo, mbstring, openssl, simplexml, dom, sockets, sodium, ffi, opcache
- name: Brew install
run: brew install automake
- name: Build ext-uv
run: |
phpize
./configure
make
make install
- name: Get runner environment variables
id: runner
uses: TheTechsTech/[email protected]
- name: Create binary archive
id: archive
run: |
tar -zcvf ext_uv-${{ github.ref_name }}_php${{ matrix.php-versions }}_macos-${{steps.runner.outputs.version}}.tgz "$(php-config --extension-dir)"/uv.so
echo "OS_LIB=$(php-config --extension-dir)" >> $GITHUB_OUTPUT
- name: Upload the binary artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ext_uv-${{ github.ref_name }}_php${{ matrix.php-versions }}_macos-${{steps.runner.outputs.version}}.tgz
asset_name: ext_uv-${{ github.ref_name }}_php${{ matrix.php-versions }}_macos-${{steps.runner.outputs.version}}.tgz
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: "macos binary - ${{ steps.archive.outputs.OS_LIB }}/uv.so"