Skip to content

0.2.8

0.2.8 #8

Workflow file for this run

name: Publish PHAR
on:
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:4.2
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: Build the PHAR
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 }}