Skip to content

build: automatic publish VSIX #43

build: automatic publish VSIX

build: automatic publish VSIX #43

Workflow file for this run

name: Package and Publish VSIX
on:
workflow_dispatch:
push:
branches:
- main
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- run: npm ci
- run: npx @vscode/vsce package
- uses: actions/upload-artifact@v4
with:
path: ./*.vsix
retention-days: 5
- uses: johnnybenson/[email protected]
id: package-json
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "has-updated -- ${{ steps.package-json.outputs.has-updated }}"
- run: echo "previous-version -- ${{ steps.package-json.outputs.previous-version }}"
- run: echo "version -- ${{ steps.package-json.outputs.version }}"
- run: echo "vsixPath=sas-lsp-${{ steps.package-json.outputs.version }}.vsix" >> "$GITHUB_OUTPUT"
id: vsixPath
if: steps.package-json.outputs.has-updated
- run: npx @vscode/vsce publish -i ${{ steps.vsixPath.outputs.vsixPath }}
if: steps.package-json.outputs.has-updated
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- run: npx ovsx publish ${{ steps.vsixPath.outputs.vsixPath }}
if: steps.package-json.outputs.has-updated
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}