Skip to content
# 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