-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.16 KB
/
release-php.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
name: Release PHP
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release-php:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Install dependencies
run: composer install
# yamllint disable-line #;< PHP_PHAR
- name: Build PHAR
run: composer build
- name: Test PHAR
run: ./.build/php-command.phar || exit 1
# yamllint disable-line #;> PHP_PHAR
- name: Get tag name
id: get-version
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
#;< PHP_PHAR
./.build/php-command.phar
#;> PHP_PHAR
#;< !PHP_PHAR
php-script
#;> !PHP_PHAR