Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 12, 2024
1 parent bf69ba5 commit a1b98b2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: release
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true

permissions:
contents: write
Expand All @@ -14,13 +19,19 @@ jobs:
- uses: actions/checkout@v4

- name: Get version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
if [ -n "$VERSION" ]; then
echo "RELEASE_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
fi
env:
VERSION: ${{ inputs.version }}

- name: Build phar
run: php -d phar.readonly=0 bin/build -v"$RELEASE_VERSION"

- name: Upload phar
run: gh release upload ${{ github.event.release.tag_name }} deployer.phar
run: gh release upload v"${RELEASE_VERSION"}" deployer.phar
env:
GH_TOKEN: ${{ github.token }}

Expand Down

0 comments on commit a1b98b2

Please sign in to comment.