Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Publish production docs

on:
workflow_dispatch:
inputs:
tag:
description: Tag whose documentation is deployed to production
required: true
type: string
workflow_call:
inputs:
tag:
Expand Down Expand Up @@ -56,7 +62,23 @@ jobs:
endpoint: ${{ secrets.endpoint }}
access-key-id: ${{ secrets.accessKeyId }}
access-key-secret: ${{ secrets.accessKeySecret }}
# ossutil 1.7 matches --include/--exclude against file names only: patterns that
# contain a directory separator are rejected outright. A whole-root sync with
# --delete would therefore remove the preview/ and staging/ prefixes owned by
# the preview deployment, so sync every production top-level entry instead.
# --delete then stays scoped to production paths; stale top-level entries are
# the only thing a removed build output would leave behind.
- name: Deploy production documentation
env:
BUCKET: ${{ secrets.bucketName }}
run: ossutil sync website/site/dist/ "oss://${BUCKET}/" --delete --exclude 'preview/*' --exclude 'staging/*' -f --disable-ignore-error
run: |
set -euo pipefail
cd website/site/dist
shopt -s nullglob dotglob
for entry in *; do
if [ -d "${entry}" ]; then
ossutil sync "${entry}/" "oss://${BUCKET}/${entry}/" --delete -f --disable-ignore-error
else
ossutil cp -f "${entry}" "oss://${BUCKET}/${entry}" --disable-ignore-error
fi
done
47 changes: 27 additions & 20 deletions .github/workflows/publish-vsix.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
name: Publish VSIX
name: Publish VSIX to Open VSX

on:
workflow_dispatch:
inputs:
source-ref:
description: Git ref the VSIX artifacts were built from
required: true
type: string
run-id:
description: Actions run id that produced the vsix-* artifacts
required: true
type: string
workflow_call:
inputs:
source-ref:
required: true
type: string
run-id:
description: Optional run id to republish artifacts from; defaults to the caller run
required: false
type: string
secrets:
VSCE_PAT:
required: true
OPEN_VSX_TOKEN:
required: true

Expand All @@ -18,12 +30,9 @@ permissions:

jobs:
publish:
name: Publish VSIX packages
name: Publish VSIX packages to Open VSX
runs-on: ubuntu-latest
environment: vscode-marketplaces
defaults:
run:
working-directory: editors/vscode
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,29 +41,27 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: editors/vscode/package-lock.json
- name: Install extension dependencies
run: npm ci
- name: Download VSIX packages
uses: actions/download-artifact@v4
with:
pattern: vsix-*
path: artifacts
merge-multiple: true
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
set -euo pipefail
for vsix in ../../artifacts/*.vsix; do
node node_modules/@vscode/vsce/vsce publish --packagePath "${vsix}"
done
run-id: ${{ inputs.run-id || github.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# The VS Code Marketplace publication is done manually by a maintainer;
# only Open VSX is automated here.
- name: Publish to Open VSX
env:
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}
run: |
set -euo pipefail
for vsix in ../../artifacts/*.vsix; do
shopt -s nullglob
vsix_files=(artifacts/*.vsix)
if [ "${#vsix_files[@]}" -eq 0 ]; then
echo "no VSIX packages found for run ${{ inputs.run-id || github.run_id }}" >&2
exit 1
fi
for vsix in "${vsix_files[@]}"; do
npx --yes ovsx@1.1.1 publish "${vsix}" -p "${OPEN_VSX_TOKEN}"
done
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
artifacts/*

publish-marketplaces:
name: Publish extension marketplaces
name: Publish extension to Open VSX
if: ${{ !inputs.dry-run && needs.validate.outputs.channel == 'stable' }}
needs: [validate, build, publish-github]
uses: ./.github/workflows/publish-vsix.yml
Expand Down
Loading