-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (63 loc) · 1.93 KB
/
release.yml
File metadata and controls
79 lines (63 loc) · 1.93 KB
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
70
71
72
73
74
75
76
77
78
79
---
name: Release new Version
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: echo release
run: echo $RELEASE
env:
RELEASE: ${{ steps.get_version.outputs.VERSION }}
- name: Checkout
uses: actions/checkout@v3
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@master
with:
exclude: "vendor/"
find: "##FORREST_VERSION##"
replace: ${{ steps.get_version.outputs.VERSION }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
ini-values: phar.readonly=0
tools: composer
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--ignore-platform-reqs --no-dev"
- name: Downgrade to php 7.4
run: |
vendor/bin/rector -c .devops/rector-php-74.php
- name: Remove rector
run: |
rm -rf vendor/rector
- name: Remove phpstan
run: |
rm -rf vendor/phpstan
- name: Download box.phar
run: |
wget https://github.com/box-project/box/releases/download/4.3.8/box.phar -P /tmp/
- name: Run box builder
run: |
php /tmp/box.phar compile
- name: Remove version check from composer in phar file
run: |
php .devops/postbox.php
- name: Move phar file to temp directory
run: |
mv bin/forrest.phar /tmp
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.REPO_TOKEN }}
file: /tmp/forrest.phar
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}