Skip to content

Commit 4a668ec

Browse files
committed
chore: add automated workflow bots (CI, CodeQL, Labeler, Release Drafter)
1 parent e1bb257 commit 4a668ec

7 files changed

Lines changed: 168 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/labeler.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
frontend:
2+
- changed-files:
3+
- any-glob-to-any-file: ["src/**/*.{ts,tsx,css,scss,html}", "public/**/*"]
4+
5+
backend:
6+
- changed-files:
7+
- any-glob-to-any-file: ["server/**/*"]
8+
9+
documentation:
10+
- changed-files:
11+
- any-glob-to-any-file: ["**/*.md"]
12+
13+
configuration:
14+
- changed-files:
15+
- any-glob-to-any-file:
16+
[
17+
".github/**/*",
18+
"package.json",
19+
"tsconfig.json",
20+
"vite.config.ts",
21+
"tailwind.config.js",
22+
]

.github/release-drafter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "🚀 Features"
5+
labels:
6+
- "feature"
7+
- "enhancement"
8+
- title: "🐛 Bug Fixes"
9+
labels:
10+
- "fix"
11+
- "bug"
12+
- title: "🧰 Maintenance"
13+
labels:
14+
- "chore"
15+
- "documentation"
16+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
17+
version-resolver:
18+
major:
19+
labels:
20+
- "major"
21+
minor:
22+
labels:
23+
- "minor"
24+
patch:
25+
labels:
26+
- "patch"
27+
default: patch
28+
template: |
29+
## What's Changed
30+
$CHANGES

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: "npm"
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build --if-present

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: ["main"]
9+
schedule:
10+
- cron: "21 16 * * 5"
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ["javascript-typescript"]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v3
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v3
40+
with:
41+
category: "/language:${{matrix.language}}"

.github/workflows/labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
triage:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/labeler@v5
13+
with:
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, reopened, synchronized]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
update_release_draft:
15+
permissions:
16+
# write permission is required to create a github release
17+
contents: write
18+
# write permission is required for autolabeler
19+
pull-requests: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
# (Optional) GitHub Enterprise requires GITHUB_TOKEN to be passed in
23+
- uses: release-drafter/release-drafter@v6
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)