Skip to content

Commit

Permalink
Workflow to build PHAR
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmccreary committed Aug 11, 2023
1 parent 77655a8 commit c9e1515
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/publish-phar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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
- name: Install the dependencies
run: COMPOSER=composer-dev.json composer install --prefer-dist --no-progress
- name: Create the PHAR file.
run: box compile --no-parallel
- name: Upload the PHAR artifact
uses: actions/upload-artifact@v3
with:
name: shift-cli.phar
path: builds/shift-cli.phar

# - name: Upload the PHAR to release
# run: gh release upload v${{ steps.tag.outputs.tag }} builds/pint.phar
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file modified builds/shift-cli
Binary file not shown.

0 comments on commit c9e1515

Please sign in to comment.