Skip to content

Commit d5df4d1

Browse files
authored
chore: add repository standardization files (#5)
1 parent 7eb6f1c commit d5df4d1

6 files changed

Lines changed: 151 additions & 0 deletions

File tree

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.{ts,tsx,js,jsx}]
12+
indent_size = 2
13+
14+
[*.json]
15+
indent_size = 2
16+
17+
[*.yml]
18+
indent_size = 2
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened]
7+
paths:
8+
- 'website/**'
9+
- '.github/workflows/build.yml'
10+
push:
11+
branches:
12+
- main
13+
paths:
14+
- 'website/**'
15+
- '.github/workflows/build.yml'
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
cache-dependency-path: website/package-lock.json
28+
29+
- name: Install dependencies
30+
working-directory: website
31+
run: npm ci
32+
33+
- name: Type check
34+
working-directory: website
35+
run: npx astro check
36+
37+
- name: Build
38+
working-directory: website
39+
run: npm run build

.github/workflows/commit-lint.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Lint Commit Messages
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
lint-pr-title:
13+
name: Lint PR Title
14+
runs-on: ubuntu-latest
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: '20'
23+
24+
- name: Install commitlint
25+
run: |
26+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
27+
28+
- name: Validate PR title
29+
env:
30+
PR_TITLE: ${{ github.event.pull_request.title }}
31+
run: |
32+
echo "Validating PR title: $PR_TITLE"
33+
echo "$PR_TITLE" | npx commitlint --verbose
34+
35+
commitlint:
36+
name: Lint Commit Messages
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: '20'
48+
49+
- name: Install commitlint
50+
run: |
51+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
52+
53+
- name: Validate PR commits
54+
run: |
55+
BASE_SHA=$(git merge-base origin/${{ github.base_ref }} HEAD)
56+
npx commitlint --from $BASE_SHA --to HEAD --verbose

.github/workflows/contributors.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Update Contributors
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
contributors:
10+
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
secrets: inherit

LICENSE

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) 2025 Calvin Allen / Coding With Calvin
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.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# dtvem.io
22

3+
[![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)
4+
[![License](https://img.shields.io/github/license/CodingWithCalvin/dtvem.io?style=for-the-badge)](LICENSE)
5+
36
The website for [dtvem](https://github.com/CodingWithCalvin/dtvem.cli), a cross-platform runtime version manager.
47

58
## Tech Stack

0 commit comments

Comments
 (0)