From 6ece341f44a4d8745cbb4aa4426823f45ea60968 Mon Sep 17 00:00:00 2001 From: Kevin Hakanson Date: Mon, 25 Mar 2024 13:00:48 -0500 Subject: [PATCH] chore: enable prerelease builds Signed-off-by: Kevin Hakanson --- .github/workflows/build_and_test.yml | 11 ++++++++--- package.json | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index cfe2fba..d847f8d 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,9 +2,9 @@ name: Build and Test on: push: - branches: [ main ] + branches: [ main, prerelease ] pull_request: - branches: [ main ] + branches: [ main, prerelease ] workflow_dispatch: jobs: @@ -69,7 +69,12 @@ jobs: xvfb-run -a npm run test - name: Package VSIX - run: npm run package + run: | + if [ $GITHUB_REF_NAME == "prerelease" ]; then + npm run package-prerelease + else + npm run package + fi - name: Upload VSIX as a workflow artifact uses: actions/upload-artifact@v4 diff --git a/package.json b/package.json index a4cc7d5..d415b34 100644 --- a/package.json +++ b/package.json @@ -222,6 +222,7 @@ "lint": "eslint src --ext ts", "test": "vscode-test", "package": "vsce package", + "package-prerelease": "vsce package --pre-release", "wasm-build": "cd vscode-cedar-wasm && wasm-pack build --target nodejs", "wasm-pkg": "cd vscode-cedar-wasm/pkg && npm pack && mv *.tgz ../.." },