-
-
Notifications
You must be signed in to change notification settings - Fork 89
69 lines (59 loc) · 1.91 KB
/
release.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
67
68
69
---
name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
php:
- 8.2
tools:
- box:4.6 # available since https://github.com/shivammathur/setup-php/releases/tag/2.27.0
steps:
- # https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v4
- # https://github.com/shivammathur/setup-php
name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: "none"
tools: ${{ matrix.tools }}
- # https://getcomposer.org/doc/06-config.md#platform
name: Setup Composer Platform
run: |
composer config platform.php 8.1
- # https://github.com/ramsey/composer-install
name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--prefer-dist"
- # https://github.com/box-project/box
name: Build Release Artifacts
run: |
box compile
box info ${{ github.workspace }}/bin/phplint.phar
- # https://github.com/softprops/action-gh-release
name: Create Release from current tag
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
with: # https://github.com/softprops/action-gh-release#-customizing
prerelease: false
draft: true
body_path: ${{ github.workspace }}/.changes/${{ github.ref_name }}.md
# https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets
files:
${{ github.workspace }}/bin/phplint.phar
fail_on_unmatched_files: true
tag_name: ${{ github.ref_name }}