-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77655a8
commit c9e1515
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.