Skip to content

Commit 9ee9a3e

Browse files
authored
Merge pull request #1 from isnandar1471/feature/initial-release
feat: Initial Release
2 parents 4264abb + c67a847 commit 9ee9a3e

22 files changed

+6771
-2
lines changed

.github/workflows/release.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release and Publish
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- "Test"
7+
types:
8+
- completed
9+
10+
jobs:
11+
release:
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Get version and name from package.json
28+
id: meta
29+
run: |
30+
VERSION=$(node -p "require('./package.json').version")
31+
NAME=$(node -p "require('./package.json').name")
32+
VSIX_FILE="$NAME-$VERSION.vsix"
33+
echo "version=$VERSION" >> $GITHUB_OUTPUT
34+
echo "name=$NAME" >> $GITHUB_OUTPUT
35+
echo "vsix_file=$VSIX_FILE" >> $GITHUB_OUTPUT
36+
37+
- name: Check if tag already exists
38+
id: tag_check
39+
run: |
40+
TAG=v${{ steps.meta.outputs.version }}
41+
if git ls-remote --tags origin | grep -q "refs/tags/$TAG"; then
42+
echo "Tag $TAG already exists. Skipping tag creation."
43+
echo "skip_tag=true" >> $GITHUB_OUTPUT
44+
else
45+
echo "skip_tag=false" >> $GITHUB_OUTPUT
46+
fi
47+
48+
- name: Create Git tag
49+
if: steps.tag_check.outputs.skip_tag == 'false'
50+
run: |
51+
git config user.name "github-actions"
52+
git config user.email "[email protected]"
53+
git tag v${{ steps.meta.outputs.version }}
54+
git push origin v${{ steps.meta.outputs.version }}
55+
56+
- name: Package VS Code Extension
57+
run: npx vsce package -o ${{ steps.meta.outputs.vsix_file }}
58+
59+
- name: Upload VSIX to GitHub Release
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
tag_name: v${{ steps.meta.outputs.version }}
63+
files: ${{ steps.meta.outputs.vsix_file }}
64+
65+
- name: Publish to VS Code Marketplace
66+
run: npx vsce publish ${{ steps.meta.outputs.vsix_file }} --pat ${{ secrets.VSCE_TOKEN }}
67+
68+
- name: Post release summary
69+
run: |
70+
echo "✅ Extension v${{ steps.meta.outputs.version }} released and published to the VS Code Marketplace."
71+
echo "🔗 GitHub Release: https://github.com/${{ github.repository }}/releases/tag/v${{ steps.meta.outputs.version }}"

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test
2+
3+
on::
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
strategy:
14+
matrix:
15+
os:
16+
- macos-latest
17+
- ubuntu-latest
18+
- windows-latest
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 18.x
29+
30+
- name: Install dependencies
31+
run: npm install
32+
33+
- name: Run tests
34+
run: npm test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix
6+
17
# Logs
28
logs
39
*.log

.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"ms-vscode.extension-test-runner"
7+
]
8+
}

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
],
15+
"outFiles": [
16+
"${workspaceFolder}/out/**/*.js"
17+
],
18+
"preLaunchTask": "${defaultBuildTask}"
19+
}
20+
]
21+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

.vscode/tasks.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

.vscodeignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
.yarnrc
6+
vsc-extension-quickstart.md
7+
**/tsconfig.json
8+
**/eslint.config.mjs
9+
**/*.map
10+
**/*.ts
11+
**/.vscode-test.*

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.0.1] -2025-07-27
9+
10+
- Initial release

0 commit comments

Comments
 (0)