From 1566e73049510fd19baba45ae7c6fb84c49e2744 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 15:53:46 +0100 Subject: [PATCH 1/8] :bug::construction: rm empty copy statement and hard-code tag for now - also remove restrictions for testing --- .github/workflows/cdci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index faf8008..a6cd86c 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -167,13 +167,13 @@ jobs: with: name: vuegen_gui_${{ matrix.os.label }} path: gui/dist/ - - name: Upload Executable to a GitHub Release - if: startsWith(github.ref, 'refs/tags') + - name: Upload Executable to a GitHub Release) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | TAG_NAME=${GITHUB_REF#refs/tags/} - cp + TAG_NAME=0.3.0-alpha + echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" gh release upload "$TAG_NAME" gui/dist/vuegen_gui.*#vuegen_gui_${{ matrix.os.label }} # https://cli.github.com/manual/gh_release_upload # either .app or .exe depending on the OS From 5f4ffb236bf14a24e591c93d6b8c3b863628423b Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 16:14:40 +0100 Subject: [PATCH 2/8] :bug: try to run it only for mac for now, specify .app --- .github/workflows/cdci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index a6cd86c..498e466 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -168,12 +168,14 @@ jobs: name: vuegen_gui_${{ matrix.os.label }} path: gui/dist/ - name: Upload Executable to a GitHub Release) + if: startsWith(${{ matrix.os.runner }}, 'macos') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | TAG_NAME=${GITHUB_REF#refs/tags/} TAG_NAME=0.3.0-alpha echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" - gh release upload "$TAG_NAME" gui/dist/vuegen_gui.*#vuegen_gui_${{ matrix.os.label }} + ls gui/dist/ + gh release upload "$TAG_NAME" gui/dist/vuegen_gui.app#vuegen_gui_${{ matrix.os.label }}.app # https://cli.github.com/manual/gh_release_upload # either .app or .exe depending on the OS From 4228709f8eaf37bc07416447b48c8bf49d052434 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 16:53:29 +0100 Subject: [PATCH 3/8] :bug: missed v prefix... - try directly with Windows --- .github/workflows/cdci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 498e466..aba3707 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -173,9 +173,23 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | TAG_NAME=${GITHUB_REF#refs/tags/} - TAG_NAME=0.3.0-alpha + TAG_NAME=v0.3.0-alpha echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" + echo "Available files in build folder: gui/dist/" ls gui/dist/ - gh release upload "$TAG_NAME" gui/dist/vuegen_gui.app#vuegen_gui_${{ matrix.os.label }}.app + echo "Uploading..." + gh release upload $TAG_NAME gui/dist/vuegen_gui.app#vuegen_gui_${{ matrix.os.label }}.app + - name: Upload Executable to a GitHub Release) + if: startsWith(${{ matrix.os.runner }}, 'windows') + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + TAG_NAME=v0.3.0-alpha + echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" + echo "Available files in build folder: gui/dist/" + ls gui/dist/ + echo "Uploading..." + gh release upload $TAG_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe # https://cli.github.com/manual/gh_release_upload # either .app or .exe depending on the OS From fe2787e144cfa64aa440ddb8bf90b53bf027fdfa Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 17:39:22 +0100 Subject: [PATCH 4/8] :bug: try to change windows tag access, zip .app folder --- .github/workflows/cdci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index aba3707..f09f00a 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -167,7 +167,7 @@ jobs: with: name: vuegen_gui_${{ matrix.os.label }} path: gui/dist/ - - name: Upload Executable to a GitHub Release) + - name: Upload MacOS Executable to a GitHub Release) if: startsWith(${{ matrix.os.runner }}, 'macos') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -177,15 +177,17 @@ jobs: echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" echo "Available files in build folder: gui/dist/" ls gui/dist/ + echo "Zip .app folder" + zip -r vuegen_gui_${{ matrix.os.label }}.zip gui/dist/vuegen_gui.app/ echo "Uploading..." - gh release upload $TAG_NAME gui/dist/vuegen_gui.app#vuegen_gui_${{ matrix.os.label }}.app - - name: Upload Executable to a GitHub Release) + gh release upload $TAG_NAME vuegen_gui_${{ matrix.os.label }}.zip + - name: Upload Windows Executable to a GitHub Release if: startsWith(${{ matrix.os.runner }}, 'windows') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - TAG_NAME=${GITHUB_REF#refs/tags/} - TAG_NAME=v0.3.0-alpha + $TAG_NAME = $env:GITHUB_REF -replace 'refs/tags/', '' + $TAG_NAME= v0.3.0-alpha echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" echo "Available files in build folder: gui/dist/" ls gui/dist/ From 1f4ca0209d55a402ec4d71b5ee6712166e4d1ac3 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 18:07:51 +0100 Subject: [PATCH 5/8] :bug: see if GITHUB_REF_NAME works, if cond. are ignored.. try different --- .github/workflows/cdci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index f09f00a..10943e2 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -168,11 +168,12 @@ jobs: name: vuegen_gui_${{ matrix.os.label }} path: gui/dist/ - name: Upload MacOS Executable to a GitHub Release) - if: startsWith(${{ matrix.os.runner }}, 'macos') + if: startsWith(matrix.os.runner, 'macos') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | TAG_NAME=${GITHUB_REF#refs/tags/} + echo GITHUB_REF_NAME $GITHUB_REF_NAME TAG_NAME=v0.3.0-alpha echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" echo "Available files in build folder: gui/dist/" @@ -182,11 +183,13 @@ jobs: echo "Uploading..." gh release upload $TAG_NAME vuegen_gui_${{ matrix.os.label }}.zip - name: Upload Windows Executable to a GitHub Release - if: startsWith(${{ matrix.os.runner }}, 'windows') + if: startsWith(matrix.os.runner, 'windows') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | $TAG_NAME = $env:GITHUB_REF -replace 'refs/tags/', '' + echo GITHUB_REF_NAME $GITHUB_REF_NAME + $TAG_NAME= $GITHUB_REF_NAME $TAG_NAME= v0.3.0-alpha echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" echo "Available files in build folder: gui/dist/" From 52348dd757d7ec4516c48cb7c27054d79a3ecde9 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 20:13:06 +0100 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=9A=A7=20retry=20with=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GITHUB_REF_NAME should make it work --- .github/workflows/cdci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 10943e2..9ac6d35 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -189,8 +189,8 @@ jobs: run: | $TAG_NAME = $env:GITHUB_REF -replace 'refs/tags/', '' echo GITHUB_REF_NAME $GITHUB_REF_NAME - $TAG_NAME= $GITHUB_REF_NAME - $TAG_NAME= v0.3.0-alpha + $TAG_NAME = $GITHUB_REF_NAME + $TAG_NAME = 'v0.3.0-alpha' echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" echo "Available files in build folder: gui/dist/" ls gui/dist/ From 8da6f73940c8e4f306ed4c0166abde8f00213de3 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 20 Mar 2025 21:21:52 +0100 Subject: [PATCH 7/8] :art: only upload releases (which are tags) - MacOs needs zipping, otherwise same as exe --- .github/workflows/cdci.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 9ac6d35..654ec36 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -168,33 +168,29 @@ jobs: name: vuegen_gui_${{ matrix.os.label }} path: gui/dist/ - name: Upload MacOS Executable to a GitHub Release) - if: startsWith(matrix.os.runner, 'macos') + if: startsWith(matrix.os.runner, 'macos') && startsWith(github.ref, 'refs/tags') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - TAG_NAME=${GITHUB_REF#refs/tags/} echo GITHUB_REF_NAME $GITHUB_REF_NAME - TAG_NAME=v0.3.0-alpha - echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" + echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME" echo "Available files in build folder: gui/dist/" ls gui/dist/ echo "Zip .app folder" zip -r vuegen_gui_${{ matrix.os.label }}.zip gui/dist/vuegen_gui.app/ echo "Uploading..." - gh release upload $TAG_NAME vuegen_gui_${{ matrix.os.label }}.zip + gh release upload $GITHUB_REF_NAME vuegen_gui_${{ matrix.os.label }}.zip + # .app is folder that needs to be zipped - name: Upload Windows Executable to a GitHub Release - if: startsWith(matrix.os.runner, 'windows') + if: startsWith(matrix.os.runner, 'windows') && startsWith(github.ref, 'refs/tags') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - $TAG_NAME = $env:GITHUB_REF -replace 'refs/tags/', '' echo GITHUB_REF_NAME $GITHUB_REF_NAME - $TAG_NAME = $GITHUB_REF_NAME - $TAG_NAME = 'v0.3.0-alpha' - echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $TAG_NAME" + echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME" echo "Available files in build folder: gui/dist/" ls gui/dist/ echo "Uploading..." - gh release upload $TAG_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe + gh release upload $GITHUB_REF_NAME gui/dist/vuegen_gui.exe#vuegen_gui_${{ matrix.os.label }}.exe # https://cli.github.com/manual/gh_release_upload - # either .app or .exe depending on the OS + # .exe is a single file already From e62ee68ff0bd1933409a49dc8e6591264608faa2 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 21 Mar 2025 08:04:45 +0100 Subject: [PATCH 8/8] :art: improve zip-folder structure --- .github/workflows/cdci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 654ec36..040b3d0 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -175,9 +175,10 @@ jobs: echo GITHUB_REF_NAME $GITHUB_REF_NAME echo "Uploading vuegen_gui_${{ matrix.os.label }} to release $GITHUB_REF_NAME" echo "Available files in build folder: gui/dist/" - ls gui/dist/ + cd gui/dist/ + ls -lh echo "Zip .app folder" - zip -r vuegen_gui_${{ matrix.os.label }}.zip gui/dist/vuegen_gui.app/ + zip -r vuegen_gui_${{ matrix.os.label }}.zip vuegen_gui.app/ echo "Uploading..." gh release upload $GITHUB_REF_NAME vuegen_gui_${{ matrix.os.label }}.zip # .app is folder that needs to be zipped