Skip to content

Commit

Permalink
Publish extension via GH action on GH release (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge authored Sep 19, 2024
1 parent 7323f7e commit 09bb967
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name: Build VS Code Extension

on:
release:
types:
- published
push:
branches:
- main
Expand Down Expand Up @@ -37,3 +40,34 @@ jobs:
with:
name: quarto-vscode-${{ github.sha }}
path: ${{ steps.package_extension.outputs.vsixPath }}


publish-extension:
runs-on: ubuntu-latest
if: |
github.event_name == 'release' &&
github.repository_owner == 'quarto-dev'
needs:
- package-extension
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: yarn install --immutable --immutable-cache --check-cache
- uses: actions/download-artifact@v4
with:
name: quarto-vscode-${{ github.sha }}

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: ${{ needs.package_extension.outputs.vsixPath }}

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
extensionFile: ${{ needs.package_extension.outputs.vsixPath }}
registryUrl: https://marketplace.visualstudio.com

0 comments on commit 09bb967

Please sign in to comment.