Skip to content

0.1.1

0.1.1 #6

Workflow file for this run

name: Publish PHAR
on:
push:
branches:
- build-phar
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
jobs:
publish:
name: Release PHAR
runs-on: ubuntu-22.04
steps:
- name: Extract the tag version
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
GITHUB_REF=${{ github.event.inputs.tag }}
fi
echo "tag=${GITHUB_REF##*v}" >> "$GITHUB_OUTPUT"
- name: Checkout the code
uses: actions/checkout@v3
with:
ref: v${{ steps.tag.outputs.tag }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: humbug/box
coverage: none
- name: Overwrite Composer for build
run: mv composer-dev.json composer.json
- name: Install Composer dependencies
run: composer install --no-dev --prefer-dist --no-progress
- name: Create the PHAR file.
run: box compile --no-parallel
- name: Upload the PHAR to release
run: gh release upload v${{ steps.tag.outputs.tag }} builds/shift-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}