From c342e88336cd54a0096198d7250b607ef8be6ff6 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Mon, 27 May 2024 20:48:43 +0000 Subject: [PATCH] ci: update workflows --- .github/workflows/release-app-for-mac-arm64.yml | 8 +++++--- .github/workflows/release-app-for-mac-x86_64.yml | 8 +++++--- .github/workflows/release-app.yml | 8 +++++--- webui/electron-builder.json5 | 3 ++- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-app-for-mac-arm64.yml b/.github/workflows/release-app-for-mac-arm64.yml index 5761882..e675e9c 100644 --- a/.github/workflows/release-app-for-mac-arm64.yml +++ b/.github/workflows/release-app-for-mac-arm64.yml @@ -18,14 +18,16 @@ jobs: working-directory: webui env: GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: List files run: ls -ltr release/* working-directory: webui - name: Upload assets to Cloudflare R2 run: | mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio_*_arm64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio_*_arm64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio_${{ env.RELEASE_VERSION }}_arm64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio_${{ env.RELEASE_VERSION }}_arm64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets env: TAG: ${{ env.RELEASE_VERSION }} @@ -36,7 +38,7 @@ jobs: - name: Upload release assets run: | for ext in dmg zip; do - export FILE=fluentci-studio_*_arm64.$ext + export FILE=fluentci-studio_${{ env.RELEASE_VERSION }}_arm64.$ext fluentci run --wasm github release_upload $TAG $FILE done env: diff --git a/.github/workflows/release-app-for-mac-x86_64.yml b/.github/workflows/release-app-for-mac-x86_64.yml index f5a360b..e0d94f7 100644 --- a/.github/workflows/release-app-for-mac-x86_64.yml +++ b/.github/workflows/release-app-for-mac-x86_64.yml @@ -18,14 +18,16 @@ jobs: working-directory: webui env: GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: List files run: ls -ltr release/* working-directory: webui - name: Upload assets to Cloudflare R2 run: | mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio_*_x64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio_*_x64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio_${{ env.RELEASE_VERSION }}_x64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio_${{ env.RELEASE_VERSION }}_x64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets env: TAG: ${{ env.RELEASE_VERSION }} @@ -36,7 +38,7 @@ jobs: - name: Upload release assets run: | for ext in dmg zip; do - export FILE=fluentci-studio_*_x64.$ext + export FILE=fluentci-studio_${{ env.RELEASE_VERSION }}_x64.$ext fluentci run --wasm github release_upload $TAG $FILE done env: diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml index 7d2f755..ed8e1b1 100644 --- a/.github/workflows/release-app.yml +++ b/.github/workflows/release-app.yml @@ -18,14 +18,16 @@ jobs: working-directory: webui env: GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: List files run: ls -ltr release/* working-directory: webui - name: Upload assets to Cloudflare R2 run: | mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio-*.AppImage r2/fluentci-studio/${{ env.RELEASE_VERSION }} - cp fluentci-studio-*.tar.gz r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio-${{ env.RELEASE_VERSION }}.AppImage r2/fluentci-studio/${{ env.RELEASE_VERSION }} + cp fluentci-studio-${{ env.RELEASE_VERSION }}.tar.gz r2/fluentci-studio/${{ env.RELEASE_VERSION }} cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets env: TAG: ${{ env.RELEASE_VERSION }} @@ -36,7 +38,7 @@ jobs: - name: Upload release assets run: | for ext in tar.gz AppImage; do - export FILE=fluentci-studio-*.$ext + export FILE=fluentci-studio-${{ env.RELEASE_VERSION }}.$ext fluentci run --wasm github release_upload $TAG $FILE done env: diff --git a/webui/electron-builder.json5 b/webui/electron-builder.json5 index 9603c22..6156408 100644 --- a/webui/electron-builder.json5 +++ b/webui/electron-builder.json5 @@ -10,11 +10,12 @@ files: ["dist-electron", "dist"], mac: { icon: "assets/icon.png", - artifactName: "${productName}_${version}_${arch}.${ext}", + artifactName: "${productName}_v${version}_${arch}.${ext}", target: ["dmg", "zip"], }, linux: { icon: "assets/icon.png", + artifactName: "${productName}_v${version}.${ext}", target: ["AppImage", "tar.gz"], }, nsis: {