Skip to content

Commit

Permalink
👷 ci: Adds auto-labels for PR and changelog releaser (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendoerr authored Aug 22, 2024
1 parent 37af06b commit 82c4ad8
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": ["enhancement"]
},
{
"title": "## 🐛 Fixes",
"labels": ["bug"]
},
{
"title": "## 🎨 Cleanup",
"labels": ["cleanup"]
},
{
"title": "## 👷 CI/CD",
"labels": ["cicd"]
},
{
"title": "## 📌 Dependencies",
"labels": ["dependencies"]
}
],
"template": "${{CHANGELOG}}\n\n## Contributors:\n${{CONTRIBUTORS}}"
}
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
enhancement:
- head-branch: ["^feature", "feature", "^new", "new"]

bug:
- head-branch: ["^fix", "fix", "^bug", "bug"]

cicd:
- head-branch: ["^ci", "ci", "^cicd", "cicd"]

documentation:
- head-branch: ["^docs", "docs"]
5 changes: 5 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ permissions:
jobs:
dependency-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
Expand All @@ -25,3 +28,5 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Dependency Review"
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
with:
comment-summary-in-pr: always
22 changes: 22 additions & 0 deletions .github/workflows/pr-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Label Pull Request

on:
pull_request:

permissions:
contents: read

jobs:
label:
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write

steps:
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit

- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 #v5.0.0
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
deployments: write

steps:
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: mikepenz/release-changelog-builder-action@f3fc77b47b74e78971fffecb2102ae6eac9a44d6 # v5
id: build_changelog
with:
configuration: .github/changelog.json
failOnError: "true"
fetchReviewers: "true"

- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{steps.build_changelog.outputs.changelog}}

0 comments on commit 82c4ad8

Please sign in to comment.