Skip to content

Commit 8da6f73

Browse files
committed
🎨 only upload releases (which are tags)
- MacOs needs zipping, otherwise same as exe
1 parent 52348dd commit 8da6f73

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

.github/workflows/cdci.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,33 +168,29 @@ jobs:
168168
name: vuegen_gui_${{ matrix.os.label }}
169169
path: gui/dist/
170170
- name: Upload MacOS Executable to a GitHub Release)
171-
if: startsWith(matrix.os.runner, 'macos')
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/}
176175
echo GITHUB_REF_NAME $GITHUB_REF_NAME
177-
TAG_NAME=v0.3.0-alpha
178-
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME"
176+
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME"
179177
echo "Available files in build folder: gui/dist/"
180178
ls gui/dist/
181179
echo "Zip .app folder"
182180
zip -r vuegen_gui_${{ matrix.os.label }}.zip gui/dist/vuegen_gui.app/
183181
echo "Uploading..."
184-
gh release upload $TAG_NAME vuegen_gui_${{ matrix.os.label }}.zip
182+
gh release upload $GITHUB_REF_NAME vuegen_gui_${{ matrix.os.label }}.zip
183+
# .app is folder that needs to be zipped
185184
- name: Upload Windows Executable to a GitHub Release
186-
if: startsWith(matrix.os.runner, 'windows')
185+
if: startsWith(matrix.os.runner, 'windows') && startsWith(github.ref, 'refs/tags')
187186
env:
188187
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189188
run: |
190-
$TAG_NAME = $env:GITHUB_REF -replace 'refs/tags/', ''
191189
echo GITHUB_REF_NAME $GITHUB_REF_NAME
192-
$TAG_NAME = $GITHUB_REF_NAME
193-
$TAG_NAME = 'v0.3.0-alpha'
194-
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME"
190+
echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME"
195191
echo "Available files in build folder: gui/dist/"
196192
ls gui/dist/
197193
echo "Uploading..."
198-
gh release upload $TAG_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe
194+
gh release upload $GITHUB_REF_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe
199195
# https://cli.github.com/manual/gh_release_upload
200-
# either .app or .exe depending on the OS
196+
# .exe is a single file already

0 commit comments

Comments
 (0)