-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (85 loc) · 2.8 KB
/
release.yml
File metadata and controls
104 lines (85 loc) · 2.8 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build and Publish Binaries
on:
release:
types: [created]
permissions:
contents: write
jobs:
build-phar:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, pcntl, posix
tools: composer:v2
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Download Box
run: curl -fsSL "https://github.com/box-project/box/releases/latest/download/box.phar" -o box.phar
- name: Build PHAR
run: php box.phar compile
- name: Upload PHAR artifact
uses: actions/upload-artifact@v4
with:
name: cnkill-phar
path: builds/cnkill
package:
needs: build-phar
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- target: linux-x86_64
runner: ubuntu-latest
micro_url: https://dl.static-php.dev/static-php-cli/common/php-8.5.4-micro-linux-x86_64.tar.gz
- target: linux-aarch64
runner: ubuntu-24.04-arm
micro_url: https://dl.static-php.dev/static-php-cli/common/php-8.5.4-micro-linux-aarch64.tar.gz
- target: macos-x86_64
runner: macos-13
micro_url: https://dl.static-php.dev/static-php-cli/common/php-8.5.4-micro-macos-x86_64.tar.gz
- target: macos-aarch64
runner: macos-latest
micro_url: https://dl.static-php.dev/static-php-cli/common/php-8.5.4-micro-macos-aarch64.tar.gz
steps:
- name: Download PHAR artifact
uses: actions/download-artifact@v4
with:
name: cnkill-phar
path: dist
- name: Download micro runtime
run: curl -fsSL "${{ matrix.micro_url }}" -o micro.tar.gz
- name: Extract micro.sfx
run: tar -xzf micro.tar.gz
- name: Build self-contained binary
run: |
mv dist/cnkill cnkill.phar
cat micro.sfx cnkill.phar > cnkill-${{ matrix.target }}
chmod +x cnkill-${{ matrix.target }}
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: cnkill-${{ matrix.target }}
upload-phar:
needs: build-phar
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Download PHAR artifact
uses: actions/download-artifact@v4
with:
name: cnkill-phar
path: dist
- name: Prepare PHAR asset
run: mv dist/cnkill cnkill.phar
- name: Upload PHAR asset
uses: softprops/action-gh-release@v2
with:
files: cnkill.phar