ci(vscode): publish platform vsix to open-vsx on release
This commit is contained in:
parent
8a28e2acf5
commit
473ec1dbc5
20
.github/workflows/rust-release.yml
vendored
20
.github/workflows/rust-release.yml
vendored
|
|
@ -759,6 +759,26 @@ jobs:
|
|||
name: openpencil-vscode-vsix
|
||||
path: packages/op-vscode/*.vsix
|
||||
if-no-files-found: error
|
||||
# Open VSX is the registry Cursor / VSCodium / Gitpod pull from. The
|
||||
# token comes from https://open-vsx.org/user-settings/tokens (an
|
||||
# account owning the `openpencil` namespace) stored as the
|
||||
# OPENVSX_TOKEN repo secret — mirrors the NPM_TOKEN hard-requirement.
|
||||
- name: Publish to Open VSX
|
||||
working-directory: packages/op-vscode
|
||||
env:
|
||||
OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "${OPENVSX_TOKEN:-}" ]; then
|
||||
echo "::error::OPENVSX_TOKEN is required to publish to open-vsx.org (create it at https://open-vsx.org/user-settings/tokens, add as repo secret)"
|
||||
exit 1
|
||||
fi
|
||||
# First-run namespace claim; harmless "already exists" afterwards.
|
||||
bunx ovsx create-namespace openpencil -p "$OPENVSX_TOKEN" || true
|
||||
for f in ./openpencil-vscode-"${OP_VERSION}"-*.vsix; do
|
||||
bunx ovsx publish --packagePath "$f" -p "$OPENVSX_TOKEN"
|
||||
done
|
||||
|
||||
release-draft:
|
||||
name: Create / update GitHub prerelease
|
||||
|
|
|
|||
|
|
@ -105,5 +105,10 @@
|
|||
"esbuild": "^0.21",
|
||||
"jsonc-parser": "^3",
|
||||
"oxlint": "latest"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ZSeven-W/openpencil.git",
|
||||
"directory": "packages/op-vscode"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue