diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index ee4c0ed..8b3ebe0 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -51,12 +51,9 @@ jobs: - name: Find built AppImage id: artifact run: | - APPIMAGE=$(ls dist/*.AppImage | head -1) - NAME=$(basename "$APPIMAGE") - NAME_ENC=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "$NAME") - echo "path=$APPIMAGE" >> "$GITHUB_OUTPUT" - echo "name=$NAME" >> "$GITHUB_OUTPUT" - echo "name_enc=$NAME_ENC" >> "$GITHUB_OUTPUT" + APPIMAGE=$(ls dist/aero-mail-*.AppImage | head -1) + echo "path=$APPIMAGE" >> "$GITHUB_OUTPUT" + echo "name=$(basename $APPIMAGE)" >> "$GITHUB_OUTPUT" - name: Create Forgejo release id: release @@ -77,7 +74,7 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_ID: ${{ steps.release.outputs.id }} ASSET_PATH: ${{ steps.artifact.outputs.path }} - ASSET_NAME: ${{ steps.artifact.outputs.name_enc }} + ASSET_NAME: ${{ steps.artifact.outputs.name }} run: | curl -sf -X POST \ -H "Authorization: token ${TOKEN}" \ diff --git a/electron-builder.yml b/electron-builder.yml index ed2ec7d..93bffb8 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -11,6 +11,7 @@ publish: linux: target: - AppImage + artifactName: aero-mail-${version}.AppImage category: Network icon: resources/icon.png win: diff --git a/src/main/services/updater.ts b/src/main/services/updater.ts index 9be8100..011d080 100644 --- a/src/main/services/updater.ts +++ b/src/main/services/updater.ts @@ -97,6 +97,10 @@ export class UpdaterService { } async checkForUpdates(): Promise<{ hasUpdate: boolean; version?: string; notes?: string }> { + if (!app.isPackaged) { + this.send('update:not-available', {}) + return { hasUpdate: false } + } try { const release = await fetchJson(REPO_API) const currentVersion = app.getVersion()