Skip to content

Commit

Permalink
refactor: use bun instead of npm (#15)
Browse files Browse the repository at this point in the history
(this should make it easier to work with and compile typescript)
  • Loading branch information
lewxdev authored Jul 10, 2024
1 parent d0bb8f5 commit 84ad254
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2,797 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
name: 🚀 Publish to the Visual Studio Marketplace
name: publish release to marketplace

on:
push:
branches:
- main
workflow_dispatch:
inputs:
version:
description: The version to release (e.g. x.x.x or major, minor, patch)
required: false
no-publish:
type: boolean
description: Skip publishing to the marketplace
default: false

permissions:
contents: write
Expand All @@ -21,23 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm clean-install

- if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version }}
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
- uses: oven-sh/setup-bun@v2

- run: |
npm exec vsce package
bun install
bun run vsce package
echo "filepath=$(ls *.vsix)" >> $GITHUB_ENV
echo "version=$(npm pkg get version | tr -d \")" >> $GITHUB_ENV
echo "version=$(ls *.vsix | grep -oE '\d+\.\d+\.\d+')" >> $GITHUB_ENV
- if: ${{ !github.event.inputs.no-publish }}
env:
- env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npm exec vsce publish -- --packagePath $filepath
run: bun run vsce publish --packagePath $filepath

- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh

echo "[commit-msg] ..."
bun run commitlint --edit ${1}
bun run commitlint --edit $1
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"name": "launch extension",
"type": "extensionHost",
"request": "launch",
"args": [
Expand Down
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit 84ad254

Please sign in to comment.