Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
feat: add proper CI
Browse files Browse the repository at this point in the history
Release-As: 0.2.0
  • Loading branch information
gbbirkisson committed Aug 20, 2024
1 parent b1cd29d commit b5adbef
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gbbirkisson
12 changes: 12 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"reviewersFromCodeOwners": true,
"dependencyDashboard": true,
"semanticCommitType": "fix",
"packageRules": [
{
"packagePatterns": ["^homeassistant[-_]?"],
"groupName": "homeassistant packages"
}
],
}
46 changes: 46 additions & 0 deletions .github/workflows/conventional-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Conventional commit

on:
pull_request_target:
types:
- edited
- opened
- ready_for_review
- reopened
- synchronize

permissions:
pull-requests: write

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-wrong
message: |
Pull request titles should follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like this PRs title does not.
<details>
<summary>Details</summary>
```
${{ steps.lint_pr_title.outputs.error_message }}
```
</details>
- uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.lint_pr_title.outputs.error_message == null }}
with:
header: pr-title-wrong
delete: true
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
name: Run Release Please
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Stale

on:
schedule:
- cron: '30 1 * * *'

permissions:
issues: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
days-before-stale: 30
days-before-close: 5
stale-issue-label: stale
exempt-issue-labels: keep
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.1"
}
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "b1cd29db3de767068db9f8aee1bdbd9cc3809ef0",
"include-v-in-tag": true,
"include-component-in-tag": false,
"extra-label": "release",
"packages": {
".": {
"release-type": "python"
}
}
}

0 comments on commit b5adbef

Please sign in to comment.