Skip to content

Commit 8db23e3

Browse files
authored
🐛 Fix github release editing (upload GUI builds) (#95)
* 🐛🚧 rm empty copy statement and hard-code tag for now - also remove restrictions for testing * 🐛 try to run it only for mac for now, specify .app * 🐛 missed v prefix... - try directly with Windows * 🐛 try to change windows tag access, zip .app folder * 🐛 see if GITHUB_REF_NAME works, if cond. are ignored.. try different * 🚧 retry with string - GITHUB_REF_NAME should make it work * 🎨 only upload releases (which are tags) - MacOs needs zipping, otherwise same as exe * 🎨 improve zip-folder structure
1 parent 99e38d9 commit 8db23e3

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/cdci.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,31 @@ jobs:
167167
with:
168168
name: vuegen_gui_${{ matrix.os.label }}
169169
path: gui/dist/
170-
- name: Upload Executable to a GitHub Release
171-
if: startsWith(github.ref, 'refs/tags')
170+
- name: Upload MacOS Executable to a GitHub Release)
171+
if: startsWith(matrix.os.runner, 'macos') && startsWith(github.ref, 'refs/tags')
172172
env:
173173
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174174
run: |
175-
TAG_NAME=${GITHUB_REF#refs/tags/}
176-
cp
177-
gh release upload "$TAG_NAME" gui/dist/vuegen_gui.*#vuegen_gui_${{ matrix.os.label }}
175+
echo GITHUB_REF_NAME $GITHUB_REF_NAME
176+
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME"
177+
echo "Available files in build folder: gui/dist/"
178+
cd gui/dist/
179+
ls -lh
180+
echo "Zip .app folder"
181+
zip -r vuegen_gui_${{ matrix.os.label }}.zip vuegen_gui.app/
182+
echo "Uploading..."
183+
gh release upload $GITHUB_REF_NAME vuegen_gui_${{ matrix.os.label }}.zip
184+
# .app is folder that needs to be zipped
185+
- name: Upload Windows Executable to a GitHub Release
186+
if: startsWith(matrix.os.runner, 'windows') && startsWith(github.ref, 'refs/tags')
187+
env:
188+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189+
run: |
190+
echo GITHUB_REF_NAME $GITHUB_REF_NAME
191+
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME"
192+
echo "Available files in build folder: gui/dist/"
193+
ls gui/dist/
194+
echo "Uploading..."
195+
gh release upload $GITHUB_REF_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe
178196
# https://cli.github.com/manual/gh_release_upload
179-
# either .app or .exe depending on the OS
197+
# .exe is a single file already

0 commit comments

Comments
 (0)