Skip to content

Commit 82c4ad8

Browse files
authored
👷 ci: Adds auto-labels for PR and changelog releaser (#8)
1 parent 37af06b commit 82c4ad8

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

.github/changelog.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## ✨ Features",
5+
"labels": ["enhancement"]
6+
},
7+
{
8+
"title": "## 🐛 Fixes",
9+
"labels": ["bug"]
10+
},
11+
{
12+
"title": "## 🎨 Cleanup",
13+
"labels": ["cleanup"]
14+
},
15+
{
16+
"title": "## 👷 CI/CD",
17+
"labels": ["cicd"]
18+
},
19+
{
20+
"title": "## 📌 Dependencies",
21+
"labels": ["dependencies"]
22+
}
23+
],
24+
"template": "${{CHANGELOG}}\n\n## Contributors:\n${{CONTRIBUTORS}}"
25+
}

.github/labeler.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
enhancement:
2+
- head-branch: ["^feature", "feature", "^new", "new"]
3+
4+
bug:
5+
- head-branch: ["^fix", "fix", "^bug", "bug"]
6+
7+
cicd:
8+
- head-branch: ["^ci", "ci", "^cicd", "cicd"]
9+
10+
documentation:
11+
- head-branch: ["^docs", "docs"]

.github/workflows/dependency-review.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ permissions:
1515
jobs:
1616
dependency-review:
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: write
1821
steps:
1922
- name: Harden Runner
2023
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
@@ -25,3 +28,5 @@ jobs:
2528
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2629
- name: "Dependency Review"
2730
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
31+
with:
32+
comment-summary-in-pr: always

.github/workflows/pr-label.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Label Pull Request
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
label:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
steps:
18+
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
19+
with:
20+
egress-policy: audit
21+
22+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 #v5.0.0

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
deployments: write
19+
20+
steps:
21+
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
22+
with:
23+
egress-policy: audit
24+
25+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
27+
- uses: mikepenz/release-changelog-builder-action@f3fc77b47b74e78971fffecb2102ae6eac9a44d6 # v5
28+
id: build_changelog
29+
with:
30+
configuration: .github/changelog.json
31+
failOnError: "true"
32+
fetchReviewers: "true"
33+
34+
- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
35+
if: startsWith(github.ref, 'refs/tags/')
36+
with:
37+
body: ${{steps.build_changelog.outputs.changelog}}

0 commit comments

Comments
 (0)