Skip to content

Commit 3fdea2d

Browse files
authored
build: automatic publish VSIX (#1225)
1 parent 298c918 commit 3fdea2d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/package.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Package VSIX
1+
name: Package and Publish VSIX
22

33
on:
44
workflow_dispatch:
@@ -21,3 +21,21 @@ jobs:
2121
with:
2222
path: ./*.vsix
2323
retention-days: 5
24+
25+
- uses: johnnybenson/[email protected]
26+
id: package-json
27+
with:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- run: echo "vsixPath=sas-lsp-${{ steps.package-json.outputs.version }}.vsix" >> "$GITHUB_OUTPUT"
30+
id: vsixPath
31+
if: steps.package-json.outputs.has-updated == 'true'
32+
- run: npx @vscode/vsce publish -i ${{ steps.vsixPath.outputs.vsixPath }}
33+
if: steps.package-json.outputs.has-updated == 'true'
34+
env:
35+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
36+
- run: npx ovsx publish ${{ steps.vsixPath.outputs.vsixPath }} -p ${{ secrets.OVSX_PAT }}
37+
if: steps.package-json.outputs.has-updated == 'true'
38+
- run: |
39+
git tag -f v${{ steps.package-json.outputs.version }}
40+
git push -f origin v${{ steps.package-json.outputs.version }}
41+
if: steps.package-json.outputs.has-updated == 'true'

0 commit comments

Comments
 (0)