Skip to content

Commit 028a6c6

Browse files
committed
🐛 Fix binary download and installation in GitHub Action
Add wildcard to release download pattern to handle varied asset names. Dynamically detect downloaded filename instead of assuming it matches the exact artifact name, fixing installation failures when asset naming differs from the expected pattern.
1 parent 1d9b595 commit 028a6c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ runs:
130130
131131
gh release download "$VERSION" \
132132
--repo hyperb1iss/git-iris \
133-
--pattern "${{ steps.platform.outputs.artifact }}" \
133+
--pattern "${{ steps.platform.outputs.artifact }}*" \
134134
--dir /tmp/git-iris-download
135135
136-
chmod +x "/tmp/git-iris-download/${{ steps.platform.outputs.binary }}"
137-
sudo mv "/tmp/git-iris-download/${{ steps.platform.outputs.binary }}" /usr/local/bin/git-iris
136+
# Downloaded file keeps original name (e.g., git-iris-linux-amd64 or git-iris-windows-gnu.exe)
137+
DOWNLOADED=$(ls /tmp/git-iris-download/)
138+
chmod +x "/tmp/git-iris-download/$DOWNLOADED"
139+
sudo mv "/tmp/git-iris-download/$DOWNLOADED" /usr/local/bin/${{ steps.platform.outputs.binary }}
138140
139141
echo "git-iris installed successfully"
140142
git-iris --version

0 commit comments

Comments
 (0)