Skip to content

Commit

Permalink
Improve workflow to publish the phar to the release. (#151)
Browse files Browse the repository at this point in the history
* Update PHP version to 8.1 in publish-phar workflow

* Add support to dispatch publish-phar workflow
  • Loading branch information
shivammathur authored Feb 22, 2023
1 parent e3a4b79 commit 087811a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/publish-phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Publish the released PHAR
on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Tag release version'
required: true

jobs:
publish:
Expand All @@ -13,15 +18,19 @@ jobs:
steps:
- name: Extract the tag version
id: tag
run: echo ::set-output name=tag::${GITHUB_REF##*v}
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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
extensions: dom, curl, libxml, mbstring, zip
ini-values: error_reporting=E_ALL
tools: composer:v2
Expand Down

0 comments on commit 087811a

Please sign in to comment.