Skip to content

Commit 67f9997

Browse files
committed
Initial commit and implementation. Adapted from open-in-git-tower-button repo and latest VS Code yeoman template.
0 parents  commit 67f9997

35 files changed

Lines changed: 11823 additions & 0 deletions
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Set GitHub Metadata
2+
on:
3+
push:
4+
branches: [main]
5+
workflow_dispatch: {}
6+
7+
jobs:
8+
build:
9+
name: Set GitHub Metadata
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Sync Package info to GitHub
19+
uses: kitschpatrol/github-action-repo-sync@v3
20+
with:
21+
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Create VS Code Plugin GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]*'
7+
8+
jobs:
9+
build:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
env:
13+
ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
14+
IS_VALID_COMMIT: false
15+
TAG_NAME: ''
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Log Token Type
24+
run: |
25+
if [ ${{ env.ACCESS_TOKEN }} == ${{ secrets.GITHUB_TOKEN }} ]; then
26+
echo "🗝️ Authenticated with GitHub Token"
27+
else
28+
echo "🔑 Authenticated with Personal Access token"
29+
fi
30+
31+
- name: Validate Tag and Branch
32+
id: validation
33+
run: |
34+
TAG=$(git tag --contains HEAD | grep '^v[0-9]' | head -n 1)
35+
echo "🏷️ Tag for commit is: $TAG"
36+
BRANCH=$(git branch -r --contains tags/${GITHUB_REF_NAME} | grep 'origin/main' | xargs)
37+
if [[ -z "$BRANCH" ]]; then
38+
echo "🚨 Tag is not on main branch"
39+
else
40+
echo "🕊️ Current branch is: $BRANCH"
41+
fi
42+
if [[ -z "$TAG" || -z "$BRANCH" ]]; then
43+
echo "IS_VALID_COMMIT=false" >> $GITHUB_ENV
44+
echo "TAG_NAME=''" >> $GITHUB_ENV
45+
else
46+
echo "IS_VALID_COMMIT=true" >> $GITHUB_ENV
47+
echo "TAG_NAME=$TAG" >> $GITHUB_ENV
48+
fi
49+
50+
- name: Setup Pnpm
51+
uses: pnpm/action-setup@v4
52+
53+
- name: Setup Node
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: 20
57+
cache: 'pnpm'
58+
59+
- run: pnpm install
60+
61+
- name: Build Plugin
62+
run: pnpm run build
63+
64+
- name: Pack Plugin
65+
run: pnpm run pack
66+
67+
- name: Release Notes
68+
if: env.IS_VALID_COMMIT == 'true'
69+
id: release-notes
70+
uses: kitschpatrol/github-action-release-changelog@v2
71+
72+
- name: Release
73+
if: env.IS_VALID_COMMIT == 'true'
74+
id: release
75+
uses: kitschpatrol/github-action-release@v2
76+
with:
77+
token: ${{ env.ACCESS_TOKEN }}
78+
draft: false
79+
prerelease: false
80+
fail_on_unmatched_files: true
81+
name: ${{ env.TAG_NAME }}
82+
tag_name: ${{ env.TAG_NAME }}
83+
body: |
84+
${{ steps.release-notes.outputs.changelog }}
85+
files: |
86+
*.vsix
87+
88+
- name: Log Release Details
89+
if: env.IS_VALID_COMMIT == 'true'
90+
run: |
91+
echo "📦 Successfully released: ${{ env.TAG_NAME }}"
92+
echo "🔗 Release URL: ${{ steps.release.outputs.url }}"
93+
echo "🪪 Release ID: ${{ steps.release.outputs.id }}"

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Git Ignore
2+
# Also used by CSpell, Stylelint, and ESLint
3+
4+
# @kitschpatrol/repo-config boilerplate
5+
.astro/
6+
.DS_Store
7+
.env
8+
.env.*
9+
!.env.example
10+
.eslint-config-inspector
11+
.svelte-kit/
12+
{tmp,temp}/
13+
**/*.min.js
14+
/scratch/
15+
bower_components/
16+
build/
17+
coverage/
18+
dist/
19+
node_modules/
20+
vendor/
21+
22+
# Customizations
23+
*.tgz
24+
*.vsix
25+
/.claude
26+
/.vscode-test
27+
/out-test
28+
!/test/fixtures/workspace/node_modules

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
publish-branch=main
2+
enable-pre-post-scripts=true
3+
node-linker=hoisted

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Prettier Ignore
2+
# Also respects .gitignore
3+
4+
# @kitschpatrol/prettier-config boilerplate
5+
pnpm-lock.yaml
6+
package-lock.json
7+
8+
# Customizations

.remarkrc.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { remarkConfig } from '@kitschpatrol/remark-config'
2+
3+
export default remarkConfig({
4+
rules: [
5+
['remark-lint-no-undefined-references', false],
6+
['remark-lint-maximum-heading-length', 80],
7+
['remark-lint-no-file-name-irregular-characters', false],
8+
],
9+
})

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"streetsidesoftware.code-spell-checker",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode",
6+
"unifiedjs.vscode-mdx",
7+
"stylelint.vscode-stylelint"
8+
]
9+
}

.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
10+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
11+
"preLaunchTask": "npm: build"
12+
}
13+
]
14+
}

.vscode/settings.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"explorer.fileNesting.enabled": true,
3+
"explorer.fileNesting.expand": false,
4+
"explorer.fileNesting.patterns": {
5+
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
6+
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
7+
".env": ".env.*, .template.env",
8+
"package.json": ".*.cjs, .*.js, .*.json, .*.mjs, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, *config.cjs, *config.js, *config.json, *config.mjs, *config.toml, *config.ts, *config.mts, *config.yaml, *config.yml, lerna.json, netlify.toml, package-lock.json, , pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, yarn.lock, yarn*",
9+
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
10+
},
11+
"cSpell.enabled": true,
12+
"cSpell.workspaceRootPath": ".",
13+
"editor.codeActionsOnSave": {
14+
"source.fixAll": "explicit",
15+
"source.organizeImports": "never"
16+
},
17+
"eslint.enable": true,
18+
"eslint.validate": [
19+
"html",
20+
"javascript",
21+
"markdown",
22+
"typescript",
23+
"astro",
24+
"javascriptreact",
25+
"json",
26+
"json5",
27+
"jsonc",
28+
"mdx",
29+
"svelte",
30+
"toml",
31+
"typescriptreact",
32+
"xml",
33+
"yaml"
34+
],
35+
"typescript.tsdk": "node_modules/typescript/lib",
36+
"[gitignore]": {
37+
"editor.defaultFormatter": "esbenp.prettier-vscode"
38+
},
39+
"[shellscript]": {
40+
"editor.defaultFormatter": "esbenp.prettier-vscode"
41+
},
42+
"editor.defaultFormatter": "esbenp.prettier-vscode",
43+
"editor.formatOnSave": true,
44+
"prettier.documentSelectors": [
45+
"**/.eslintignore",
46+
"**/.node-version",
47+
"**/.npmrc",
48+
"**/.prettierignore",
49+
"**/*.astro",
50+
"**/*.rb",
51+
"**/*.svelte"
52+
],
53+
"prettier.enable": true,
54+
"typescript.enablePromptUseWorkspaceTsdk": true,
55+
"eslint.runtime": "node",
56+
"eslint.useFlatConfig": true,
57+
"stylelint.enable": true,
58+
"stylelint.validate": ["css", "html", "svelte", "astro"],
59+
"[astro]": {
60+
"editor.defaultFormatter": "esbenp.prettier-vscode"
61+
},
62+
"[ruby]": {
63+
"editor.defaultFormatter": "esbenp.prettier-vscode"
64+
},
65+
"[svelte]": {
66+
"editor.defaultFormatter": "esbenp.prettier-vscode"
67+
}
68+
}

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024-2025 Eric Mika
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)