Skip to content

Commit

Permalink
Create separate open-vsx publishing action (#1491)
Browse files Browse the repository at this point in the history
## Changes
Create separate open-vsx publishing action

## Tests
  • Loading branch information
ilia-db authored Dec 18, 2024
1 parent e1e2b60 commit 887771e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 11 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish-to-openvsx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish to Open VSX Marketplace

on:
workflow_dispatch:
inputs:
version:
description: "Release tag"
required: true
type: string

release:
types: [published]

jobs:
publish-to-openvsx:
runs-on: ubuntu-latest
environment: Production

steps:
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Download release
run: |
set x
echo Version: ${{ github.event.inputs.version }}
echo REF: ${{ github.ref }}
TAG=${{ github.event.inputs.version }}
if [[ ! -z "${{ github.event.inputs.version }}" ]]; then
TAG=${{ github.event.inputs.version }}
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG=$(echo ${{ github.ref }} | sed -e "s|^refs/tags/||")
else
exit 1
fi
echo Tag: $TAG
gh release download $TAG -R databricks/databricks-vscode
ls -lR
echo "TAG=$TAG" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install vcse
run: npm install -g @vscode/vsce

- name: Install ovsx
run: npm install -g ovsx

- name: Publish to Open VSX
run: |
ovsx verify-pat databricks
ovsx publish --packagePath databricks-*.vsix
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
11 changes: 0 additions & 11 deletions .github/workflows/publish-to-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,3 @@ jobs:
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}

# - name: Install ovsx
# run: npm install -g ovsx

# - name: Publish to Open VSIX
# run: |
# ovsx verify-pat databricks
# ovsx publish --packagePath databricks-*.vsix

# env:
# OVSX_PAT: ${{ secrets.OVSX_PAT }}

0 comments on commit 887771e

Please sign in to comment.