From f377ffc114672f10185317f56047ec0ed913618a Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Sun, 4 Jan 2026 16:13:21 -0500 Subject: [PATCH] chore: add repository standardization files - Add MIT LICENSE - Add .editorconfig for TypeScript/Astro projects - Add build.yml workflow for PR/push validation - Add commit-lint.yml workflow for conventional commits - Add contributors.yml workflow for README updates - Add build status and license badges to README --- .editorconfig | 21 +++++++++++ .github/workflows/build.yml | 39 +++++++++++++++++++++ .github/workflows/commit-lint.yml | 56 ++++++++++++++++++++++++++++++ .github/workflows/contributors.yml | 11 ++++++ LICENSE | 21 +++++++++++ README.md | 3 ++ 6 files changed, 151 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/commit-lint.yml create mode 100644 .github/workflows/contributors.yml create mode 100644 LICENSE diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ebf79a7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{ts,tsx,js,jsx}] +indent_size = 2 + +[*.json] +indent_size = 2 + +[*.yml] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e983d35 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + types: [opened, reopened] + paths: + - 'website/**' + - '.github/workflows/build.yml' + push: + branches: + - main + paths: + - 'website/**' + - '.github/workflows/build.yml' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: website/package-lock.json + + - name: Install dependencies + working-directory: website + run: npm ci + + - name: Type check + working-directory: website + run: npx astro check + + - name: Build + working-directory: website + run: npm run build diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml new file mode 100644 index 0000000..d1b0f2b --- /dev/null +++ b/.github/workflows/commit-lint.yml @@ -0,0 +1,56 @@ +name: Lint Commit Messages + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + contents: read + pull-requests: read + +jobs: + lint-pr-title: + name: Lint PR Title + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install commitlint + run: | + npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3 + + - name: Validate PR title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "Validating PR title: $PR_TITLE" + echo "$PR_TITLE" | npx commitlint --verbose + + commitlint: + name: Lint Commit Messages + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install commitlint + run: | + npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3 + + - name: Validate PR commits + run: | + BASE_SHA=$(git merge-base origin/${{ github.base_ref }} HEAD) + npx commitlint --from $BASE_SHA --to HEAD --verbose diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml new file mode 100644 index 0000000..6c91a77 --- /dev/null +++ b/.github/workflows/contributors.yml @@ -0,0 +1,11 @@ +name: Update Contributors + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + contributors: + uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main + secrets: inherit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..230e7db --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Calvin Allen / Coding With Calvin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index fe1c382..ecd5f7a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # dtvem.io +[![Build](https://img.shields.io/github/actions/workflow/status/CodingWithCalvin/dtvem.io/build.yml?style=for-the-badge)](https://github.com/CodingWithCalvin/dtvem.io/actions) +[![License](https://img.shields.io/github/license/CodingWithCalvin/dtvem.io?style=for-the-badge)](LICENSE) + The website for [dtvem](https://github.com/CodingWithCalvin/dtvem.cli), a cross-platform runtime version manager. ## Tech Stack