Skip to content

Commit a1b98b2

Browse files
committed
Update release.yml
1 parent bf69ba5 commit a1b98b2

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: release
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version'
10+
required: true
611

712
permissions:
813
contents: write
@@ -14,13 +19,19 @@ jobs:
1419
- uses: actions/checkout@v4
1520

1621
- name: Get version
17-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
22+
run: |
23+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
24+
if [ -n "$VERSION" ]; then
25+
echo "RELEASE_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
26+
fi
27+
env:
28+
VERSION: ${{ inputs.version }}
1829

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

2233
- name: Upload phar
23-
run: gh release upload ${{ github.event.release.tag_name }} deployer.phar
34+
run: gh release upload v"${RELEASE_VERSION"}" deployer.phar
2435
env:
2536
GH_TOKEN: ${{ github.token }}
2637

0 commit comments

Comments
 (0)