Skip to content

Commit 89eb7d5

Browse files
committed
added release drafter and labeler
1 parent 4de8f6e commit 89eb7d5

File tree

4 files changed

+234
-0
lines changed

4 files changed

+234
-0
lines changed

.github/labeler.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Auto-label PRs based on changed files
2+
3+
# Application areas
4+
frontend:
5+
- changed-files:
6+
- any-glob-to-any-file: 'code/frontend/**/*'
7+
8+
backend:
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
- 'code/backend/**/*'
12+
# Exclude test files (they get their own label)
13+
- '!code/backend/**/*.Tests/**/*'
14+
15+
tests:
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- 'code/backend/**/*.Tests/**/*'
19+
- '**/*[Tt]est*.cs'
20+
- '**/*[Ss]pec*.cs'
21+
22+
documentation:
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- 'docs/**/*'
26+
- '*.md'
27+
- 'README.md'
28+
- 'CONTRIBUTING.md'
29+
- 'CHANGELOG.md'
30+
31+
# Infrastructure
32+
workflows:
33+
- changed-files:
34+
- any-glob-to-any-file: '.github/workflows/**/*'
35+
36+
github-actions:
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- '.github/workflows/**/*'
40+
- '.github/actions/**/*'
41+
42+
docker:
43+
- changed-files:
44+
- any-glob-to-any-file:
45+
- '**/Dockerfile'
46+
- 'docker-compose*.yml'
47+
- '.dockerignore'
48+
49+
# Dependencies and configuration
50+
dependencies:
51+
- changed-files:
52+
- any-glob-to-any-file:
53+
- '**/package.json'
54+
- '**/package-lock.json'
55+
- '**/*.csproj'
56+
- '**/packages.lock.json'
57+
- '**/yarn.lock'
58+
59+
configuration:
60+
- changed-files:
61+
- any-glob-to-any-file:
62+
- '**/*appsettings*.json'
63+
- '**/*.config'
64+
- '**/.env*'
65+
- '**/tsconfig*.json'
66+
- '**/angular.json'
67+
68+
chore:
69+
- changed-files:
70+
- any-glob-to-any-file:
71+
- '.github/**/*'
72+
- '.gitignore'
73+
- '.editorconfig'
74+
- '.prettierrc*'
75+
- '.eslintrc*'

.github/release-drafter.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
4+
categories:
5+
- title: '🚀 Features'
6+
labels:
7+
- 'feature'
8+
- 'enhancement'
9+
- title: '🐛 Bug Fixes'
10+
labels:
11+
- 'bug'
12+
- 'fix'
13+
- title: '📚 Documentation'
14+
labels:
15+
- 'documentation'
16+
- 'docs'
17+
- title: '🔧 Maintenance'
18+
labels:
19+
- 'dependencies'
20+
- 'chore'
21+
- 'github-actions'
22+
- title: '⚡ Performance'
23+
labels:
24+
- 'performance'
25+
- title: '🔒 Security'
26+
labels:
27+
- 'security'
28+
29+
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
30+
change-title-escapes: '\<*_&'
31+
32+
version-resolver:
33+
major:
34+
labels:
35+
- 'major'
36+
- 'breaking'
37+
minor:
38+
labels:
39+
- 'minor'
40+
- 'feature'
41+
patch:
42+
labels:
43+
- 'patch'
44+
- 'bug'
45+
- 'fix'
46+
- 'dependencies'
47+
default: patch
48+
49+
template: |
50+
## What's Changed
51+
52+
$CHANGES
53+
54+
## New Contributors
55+
$CONTRIBUTORS
56+
57+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
58+
59+
## Installation
60+
61+
### Docker
62+
```bash
63+
docker pull ghcr.io/cleanuparr/testing:$RESOLVED_VERSION
64+
```
65+
66+
### Binary
67+
Download the appropriate binary for your platform from the assets below.
68+
69+
## Upgrade Notes
70+
<!-- Add any important upgrade instructions here before publishing -->
71+
72+
exclude-labels:
73+
- 'skip-changelog'
74+
- 'duplicate'
75+
- 'invalid'
76+
- 'wontfix'
77+
78+
autolabeler:
79+
- label: 'bug'
80+
title:
81+
- '/fix/i'
82+
- '/bug/i'
83+
- label: 'feature'
84+
title:
85+
- '/feat/i'
86+
- '/feature/i'
87+
- '/add/i'
88+
- label: 'documentation'
89+
files:
90+
- '*.md'
91+
- 'docs/**/*'
92+
- label: 'frontend'
93+
files:
94+
- 'code/frontend/**/*'
95+
- label: 'backend'
96+
files:
97+
- 'code/backend/**/*'
98+
- label: 'workflows'
99+
files:
100+
- '.github/workflows/**/*'
101+
- label: 'docker'
102+
files:
103+
- '**/Dockerfile'
104+
- 'docker-compose*.yml'
105+
- label: 'dependencies'
106+
branch:
107+
- '/dependabot\/.*/i'

.github/workflows/labeler.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
label:
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Label PR
22+
uses: actions/labeler@v5
23+
with:
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
configuration-path: .github/labeler.yml
26+
sync-labels: true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request_target:
8+
types: [opened, reopened, synchronize, labeled, unlabeled]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
update_release_draft:
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Run Release Drafter
22+
uses: release-drafter/release-drafter@v6
23+
with:
24+
config-name: release-drafter.yml
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)