-
Notifications
You must be signed in to change notification settings - Fork 35
66 lines (66 loc) · 1.59 KB
/
ci.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
name: CI
on:
- push
- pull_request
jobs:
build-php:
name: Prepare PHP
runs-on: ubuntu-20.04
strategy:
matrix:
php:
- "8.2"
steps:
- name: Build and prepare PHP cache
uses: pmmp/setup-php-action@main
with:
php-version: ${{ matrix.php }}
install-path: "../bin"
pm-version-major: "5"
phpstan:
name: phpstan analyze
needs: [build-php]
runs-on: ubuntu-20.04
strategy:
matrix:
php:
- "8.2"
steps:
- uses: actions/checkout@v3
- uses: pmmp/setup-php-action@main
with:
php-version: ${{ matrix.php }}
install-path: "../bin"
pm-version-major: "5"
- name: Install Composer
run: curl -sS https://getcomposer.org/installer | php
- run: composer install
- name: phpstan analyze
run: composer analyze
pharynx:
name: build phar
permissions:
contents: write
needs: [build-php]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
strategy:
matrix:
php:
- "8.2"
steps:
- uses: actions/checkout@v3
- uses: pmmp/setup-php-action@main
with:
php-version: ${{ matrix.php }}
install-path: "../bin"
pm-version-major: "5"
- uses: SOF3/[email protected]
id: pharynx
with:
additional-assets: |
icon.png
- uses: actions/upload-artifact@v3
with:
name: plugin.phar
path: ${{steps.pharynx.outputs.output-phar}}