-
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (43 loc) · 1.54 KB
/
distribute.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
name: distribute
on:
push:
tags:
- 'v*'
jobs:
build:
name: distribute
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
attestations: write
strategy:
fail-fast: true
matrix:
php:
- "8.3"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Install Box Phar bundler
run: wget --quiet https://github.com/box-project/box/releases/download/4.6.1/box.phar && sudo mv box.phar /usr/bin/box && sudo chmod u+x /usr/bin/box
shell: bash
- name: Build PHAR
run: /usr/bin/box compile
- name: Check generated PHAR
run: bin/lean-package-validator.phar --version
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/lean-package-validator.phar
- name: Create attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: bin/lean-package-validator.phar