Skip to content

Commit

Permalink
add github action template (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossknudsen committed Mar 22, 2024
1 parent 9358d32 commit eb1a585
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
workflow_dispatch:
inputs:
publish:
description: Whether the extension should be published to the extension registries.
type: boolean
default: false
version:
description: The SemVer version for this Build
required: true
default: "0.0.0"
type: string

name: Build and deploy extension
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: cd webview-ui && npm ci
- name: Publish to Open VSX Registry
if: ${{ github.event.inputs.publish == 'true' }}
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
if: ${{ github.event.inputs.publish == 'true' }}
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com

0 comments on commit eb1a585

Please sign in to comment.