From 087811a7c576a2d5d5af0695de8ab1a9c9dab0a3 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 22 Feb 2023 13:56:34 +0530 Subject: [PATCH] Improve workflow to publish the phar to the release. (#151) * Update PHP version to 8.1 in publish-phar workflow * Add support to dispatch publish-phar workflow --- .github/workflows/publish-phar.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-phar.yml b/.github/workflows/publish-phar.yml index 4d9c9e5d..7e01a4c8 100644 --- a/.github/workflows/publish-phar.yml +++ b/.github/workflows/publish-phar.yml @@ -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: @@ -13,7 +18,11 @@ 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 @@ -21,7 +30,7 @@ jobs: - 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