Skip to content

Commit

Permalink
Add
Browse files Browse the repository at this point in the history
  • Loading branch information
hellovai committed Nov 6, 2023
1 parent 9b765d7 commit e80aa9d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/vscode_ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,21 @@ jobs:
pnpm run vscode:package
VERSION=$(cat package.json| grep version | cut -d ' ' -f 4 | sed 's/[",]//g')
echo "version=$VERSION" >> $GITHUB_OUTPUT
working-directory: typescript/vscode-ext/packages/vscode
working-directory: typescript/vscode-ext/packages

# Upload the artifact (helpful for debugging and manual downloads)
- name: Upload VSCode Extension Artifact
uses: actions/upload-artifact@v3
with:
name: baml-vscode.vsix
path: typescript/vscode-ext/packages/vscode/baml-${{ steps.build.outputs.version }}.vsix
path: typescript/vscode-ext/packages/baml-${{ steps.build.outputs.version }}.vsix

# Upload the artifact (helpful for debugging and manual downloads)
- name: Upload VSCode Extension Artifact
uses: actions/upload-artifact@v3
with:
name: baml-out
path: typescript/vscode-ext/packages/vscode/out

pre-release:
runs-on: ubuntu-latest
Expand All @@ -95,7 +102,13 @@ jobs:
uses: actions/download-artifact@v3
with:
name: baml-vscode.vsix
path: typescript/vscode-ext/packages/vscode
path: typescript/vscode-ext/packages

- name: Get artifact
uses: actions/download-artifact@v3
with:
name: baml-out
path: typescript/vscode-ext/packages/vscode/out

- id: hash
run: |
Expand Down Expand Up @@ -142,7 +155,7 @@ jobs:
- name: Publish
run: |
pnpm run vscode:publish --pre-release --no-git-tag-version -p ${{ secrets.VSCODE_PAT }}
working-directory: typescript/vscode-ext/packages/vscode
working-directory: typescript/vscode-ext/packages

release:
permissions:
Expand All @@ -160,8 +173,14 @@ jobs:
uses: actions/download-artifact@v3
with:
name: baml-vscode.vsix
path: typescript/vscode-ext/packages/vscode
path: typescript/vscode-ext/packages/

- name: Get artifact
uses: actions/download-artifact@v3
with:
name: baml-out
path: typescript/vscode-ext/packages/vscode/out

- id: hash
run: |
VERSION=$(cat typescript/.bumpversion.cfg | grep current_version | cut -d '=' -f 2 | sed 's/[", ]//g')
Expand Down Expand Up @@ -207,4 +226,4 @@ jobs:
- name: Publish
run: |
pnpm run vscode:publish --no-git-tag-version -p ${{ secrets.VSCODE_PAT }}
working-directory: typescript/vscode-ext/packages/vscode
working-directory: typescript/vscode-ext/packages
Binary file removed typescript/vscode-ext/packages/logo.png
Binary file not shown.
4 changes: 3 additions & 1 deletion typescript/vscode-ext/packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@
}
},
"scripts": {
"lint": "eslint \"src/**/*.ts\""
"lint": "eslint \"src/**/*.ts\"",
"vscode:package": "vsce package --no-dependencies",
"vscode:publish": "vsce publish --no-dependencies"
},
"dependencies": {
"env-paths": "2.2.1",
Expand Down
2 changes: 0 additions & 2 deletions typescript/vscode-ext/packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node ",
"esbuild-build": "pnpm run esbuild-base --sourcemap",
"esbuild-watch": "pnpm run esbuild-base --sourcemap --watch",
"vscode:package": "vsce package --no-dependencies",
"vscode:publish": "vsce publish --no-dependencies",
"lint": "eslint \"src/**/*.ts\"",
"watch": "esbuild --bundle --watch --sourcemap --external:vscode --format=cjs --platform=node ./src/extension.ts --outfile=out/extension.js --watch",
"build": "pnpm run esbuild-base --sourcemap",
Expand Down

0 comments on commit e80aa9d

Please sign in to comment.