Skip to content

Commit e8a147f

Browse files
author
linyuan.yang
committed
fix release app
1 parent a33940d commit e8a147f

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

‎.github/workflows/release-app.yml‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,26 @@ jobs:
244244
working-directory: packages/vscode-extension
245245
env:
246246
VSCE_PAT: ${{ secrets.VSCE_PAT }}
247-
run: npx --yes @vscode/vsce publish --no-dependencies --packagePath "sbot-vscode-${{ steps.version.outputs.version }}.vsix"
247+
shell: bash
248+
run: |
249+
VSIX="sbot-vscode-${{ steps.version.outputs.version }}.vsix"
250+
251+
set +e
252+
OUT=$(npx --yes @vscode/vsce publish --no-dependencies --packagePath "$VSIX" 2>&1)
253+
CODE=$?
254+
set -e
255+
echo "$OUT"
256+
[ $CODE -eq 0 ] && exit 0
257+
258+
# Same version already on the Marketplace — skip without failing the workflow,
259+
# so the rest of the release pipeline (desktop/android) isn't blocked by a
260+
# re-run of the same tag. Bump the version to actually push an update.
261+
if echo "$OUT" | grep -qi "already exists"; then
262+
echo "::warning::v${{ steps.version.outputs.version }} already on Marketplace — skipped. Bump packages/vscode-extension/package.json to release a new version."
263+
exit 0
264+
fi
265+
266+
exit $CODE
248267
249268
- name: Attach VSIX to release
250269
if: github.event_name == 'push'

0 commit comments

Comments
 (0)