-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.65 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: release
on:
push:
tags:
- '*'
env:
BOX_VERSION: '4.6.2'
permissions:
contents: write
jobs:
build:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
php: ['8.3']
arch: ['x86_64']
system: ['linux']
steps:
- name: 'Checkout Code'
uses: 'actions/checkout@v4'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '8.3'
extensions: intl, zip, zlib
coverage: none
ini-values: memory_limit=1G, phar.readonly=0
- name: 'Install Project Dependencies'
run: composer install --no-interaction --no-ansi --no-progress
- name: 'Install Box'
run: |
wget \
"https://github.com/humbug/box/releases/download/${BOX_VERSION}/box.phar" \
--quiet \
-O ./box
chmod +x ./box
sudo mv ./box /usr/local/bin
- name: 'Compile the application'
run: |
vendor/bin/castor repack --os=${{ matrix.system }} --app-name=beaver --app-version=${{ github.ref_name }}
vendor/bin/castor compile beaver.linux.phar --php-version=${{ matrix.php }} --arch=${{ matrix.arch }} --os=${{ matrix.system }}
- name: 'Move applications'
run: mv beaver.* ./bin/
- name: 'Create Release'
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.ref_name }}
tag: ${{ github.ref_name }}
body: 'Next stable release.'
allowUpdates: true
artifacts: 'bin/*'
artifactContentType: application/x-php