Skip to content

Commit

Permalink
Add release drafter (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Oct 16, 2024
1 parent 9410d19 commit 4645762
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name-template: "$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "Breaking Changes"
label: "breaking-change"
- title: "Dependencies"
collapse-after: 1
labels:
- "dependencies"

version-resolver:
major:
labels:
- "major"
- "breaking-change"
minor:
labels:
- "minor"
- "new-feature"
patch:
labels:
- "bugfix"
- "dependencies"
- "documentation"
- "enhancement"
default: patch

template: |
## What's Changed
$CHANGES
34 changes: 34 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: read

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
id: drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4

- name: Set library.json version
run: |
sed -i "s/\"version\": .*/\"version\": \"${{ steps.drafter.outputs.resolved_version }}\"/g" library.json
- name: Commit changes
run: |
if ! git diff --quiet; then
git config --global user.name "esphomebot"
git config --global user.email "[email protected]"
git commit -am "Bump version to ${{ steps.drafter.outputs.resolved_version }}"
git push
fi

0 comments on commit 4645762

Please sign in to comment.