Skip to content

Commit

Permalink
config: updates & add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
xseman committed Dec 6, 2024
1 parent b6914c2 commit f6337aa
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 12 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
tab_width = 4
max_line_length = 100
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
indent_style = space
indent_size = 4
31 changes: 31 additions & 0 deletions .github/.release-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"include-v-in-tag": true,
"include-component-in-tag": false,
"pull-request-title-pattern": "v${version}",
"pull-request-header": "",
"pull-request-footer": ""
}
},
"changelog-sections": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "deps", "section": "Dependency Updates" },
{ "type": "docs", "section": "Documentation" },
{ "type": "ops", "section": "Operations" },
{ "type": "build", "section": "Build System" },
{ "type": "ci", "section": "Maintenance" },
{ "type": "chore", "section": "Maintenance" },
{ "type": "config", "section": "Maintenance" },
{ "type": "refactor", "section": "Maintenance" },
{ "type": "revert", "section": "Reverts" },
{ "type": "security", "section": "Security" },
{ "type": "test", "section": "Testing" },
{ "type": "style", "section": "Code Style", "hidden": true },
{ "type": "examples", "section": "Examples", "hidden": true }
]
}
3 changes: 3 additions & 0 deletions .github/.release-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.9"
}
32 changes: 32 additions & 0 deletions .github/workflows/inactive-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: check & close inactive issues

on:
schedule:
- cron: 30 1 * * *

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
env:
DAYS_BEFORE_STALE: 90
DAYS_BEFORE_CLOSE: 30
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: ${{ env.DAYS_BEFORE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_CLOSE }}
remove-stale-when-updated: true
exempt-all-assignees: true
exempt-issue-labels: good first issue,help wanted
stale-issue-label: stale

stale-issue-message: >
Hey! 👋 This issue has been inactive for
${{ env.DAYS_BEFORE_STALE }} days. We'd love your input!
close-issue-message: >
Thanks for your input! This issue is closed due to inactivity for
${{ env.DAYS_BEFORE_CLOSE }} days. Reopen anytime! ✌️
41 changes: 41 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release-please

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
manifest-file: .github/.release-manifest.json
config-file: .github/.release-config.json
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
cache: npm

- name: Build and publish on VS Code Marketplace
if: ${{ steps.release.outputs.release_created }}
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
npm install
npx vsce package
npx vsce publish
22 changes: 11 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
"typescript.validate.enable": false
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.preferTypeOnlyAutoImports": true,
"files.associations": {
"tsconfig.json": "jsonc",
"dprint.json": "jsonc"
},
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"[typescript][javascript][markdown][json][yaml][yml][github-actions-workflow]": {
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnSave": true
}
}
34 changes: 34 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"lineWidth": 80,
"useTabs": true,
"indentWidth": 4,
"yaml": {
"indentWidth": 4
},
"typescript": {
"arrayExpression.preferHanging": "onlySingleItem",
"arrowFunction.useParentheses": "force",
"binaryExpression.operatorPosition": "nextLine",
"ifStatement.nextControlFlowPosition": "maintain",
"semiColons": "always",
"trailingCommas": "onlyMultiLine",
"quoteStyle": "preferDouble",
"quoteProps": "consistent",
"importDeclaration.forceMultiLine": "whenMultiple"
},
"includes": [
"**/*.{ts,js,json,md,yml,yaml}"
],
"excludes": [
"**/node_modules",
"**/*-lock.json",
"tsconfig.json",
"CHANGELOG.md"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
]
}

0 comments on commit f6337aa

Please sign in to comment.