Skip to content

Commit

Permalink
build: automatic publish VSIX
Browse files Browse the repository at this point in the history
  • Loading branch information
scnwwu committed Sep 27, 2024
1 parent 298c918 commit 0efd765
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Package VSIX
name: Package and Publish VSIX

on:
workflow_dispatch:
Expand All @@ -21,3 +21,21 @@ jobs:
with:
path: ./*.vsix
retention-days: 5

- uses: johnnybenson/[email protected]
id: package-json
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "vsixPath=sas-lsp-${{ steps.package-json.outputs.version }}.vsix" >> "$GITHUB_OUTPUT"
id: vsixPath
if: steps.package-json.outputs.has-updated == 'true'
- run: npx @vscode/vsce publish -i ${{ steps.vsixPath.outputs.vsixPath }}
if: steps.package-json.outputs.has-updated == 'true'
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- run: npx ovsx publish ${{ steps.vsixPath.outputs.vsixPath }} -p ${{ secrets.OVSX_PAT }}
if: steps.package-json.outputs.has-updated == 'true'
- run: |
git tag -f v${{ steps.package-json.outputs.version }}
git push -f origin v${{ steps.package-json.outputs.version }}
if: steps.package-json.outputs.has-updated == 'true'

0 comments on commit 0efd765

Please sign in to comment.