From 0feb78c3f94f1aff5ef3962a1cfecd8042edad86 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Tue, 7 May 2024 15:37:44 -0600 Subject: [PATCH] Add GH action to generate `.vsix` artifact (#434) * First try at GH action to generate `.vsix` artifact * This thing is actually a zip file * Fix GH SHA for artifact name * Use latest `upload-artifact` --- .github/workflows/ci.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..ab93c292 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,39 @@ + +name: Build VS Code Extension + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + package-extension: + runs-on: ubuntu-latest + outputs: + vsixPath: ${{ steps.package_extension.outputs.vsixPath }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: latest + - run: yarn install --immutable --immutable-cache --check-cache + + - name: Package extension + uses: HaaLeo/publish-vscode-extension@v1 + id: package_extension + with: + pat: not-a-real-pat + yarn: true + dryRun: true + preRelease: true + packagePath: apps/vscode + + - name: Upload extension vsix file as a workflow artifact + uses: actions/upload-artifact@v4 + with: + name: quarto-vscode-${{ github.sha }} + path: ${{ steps.package_extension.outputs.vsixPath }}