-
-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (45 loc) · 1.48 KB
/
vortex-release-installer.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
# This action is used for Vortex maintenance. It will not be used in the scaffolded project.
name: Vortex - Release installer
on:
push:
tags:
- '*'
branches:
- '**release-installer**'
jobs:
vortex-release-installer:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- 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.1
- name: Install dependencies
run: composer install
working-directory: .vortex/installer
- name: Add version
run: |
TAG=${{ github.ref_type == 'tag' && github.ref_name || '' }}
SHA=${{ github.ref_type == 'branch' && github.sha || '' }}
sed -i "s/\"git-tag-ci\": \"dev\"/\"git-tag-ci\": \"${TAG:-${SHA}}\"/g" box.json
working-directory: .vortex/installer
- name: Build PHAR
run: composer build
working-directory: .vortex/installer
- name: Test PHAR
run: ./.build/installer --quiet || exit 1
working-directory: .vortex/installer
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: vortex-installer
path: .vortex/installer/.build/installer