forked from phpactor/phpactor
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.43 KB
/
release-phar.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
on:
release:
types:
- created
name: Append phpactor.phar to release
jobs:
build:
name: Compile and upload Phar
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
-
name: "Composer install"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--no-scripts --no-dev"
- name: Compile phpactor.phar
run: .github/build-phar.sh
- name: Check existence of compiled .phar
run: test -e build/phpactor.phar && exit 0 || exit 10
- name: "Upload PHAR to Release"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/phpactor.phar
asset_name: phpactor.phar
asset_content_type: application/octet-stream
#- name: "Attach signature to Release"
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./build/phpactor.phar.asc
# asset_name: phpactor.phar.asc
# asset_content_type: application/pgp-signature