-
-
Notifications
You must be signed in to change notification settings - Fork 13
59 lines (46 loc) · 1.65 KB
/
building_phar_executable.yml
File metadata and controls
59 lines (46 loc) · 1.65 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
name: Building Phar Executable on release
on:
release:
types: [created]
jobs:
generate:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.5']
name: PHP ${{ matrix.php-version }} - Create release-artifacts
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json, dom, pdo, pdo_sqlite
- name: Check PHP Version
run: php -v
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-dev
- name: Install Phar Composer
run: curl -JL -o /tmp/phar-composer.phar https://clue.engineering/phar-composer-latest.phar
- name: Cleanup repository
continue-on-error: true
run: rm -R .git .github Benchmarks Dev Documentation Examples Tests *.psd *.png *.txt *.dist .travis.yml .gitignore *.cache *.md
- name: Build Phar
run: php /tmp/phar-composer.phar build .
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '*.phar'