-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (31 loc) · 936 Bytes
/
build.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
on:
push:
branches:
- main
- master
- 'release/**'
pull_request:
branches:
- main
- master
- 'release/**'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: mbstring, xml, ctype, iconv, intl
coverage: xdebug
- name: Install Composer dependencies
run: ./composer.phar install --no-progress --prefer-dist --optimize-autoloader
- name: Run Tests
run: vendor/bin/phpunit --coverage-text
- name: Deploy package to package repository
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
run: |
git tag ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER
git push origin ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER