Skip to content

Commit 37a416f

Browse files
authored
Use release-drafter to generate release tag, add categories for PRs (#833)
* Use release tag name as version number * Improve release-drafter categories * Add tag and name template * Fix comment
1 parent 7f34106 commit 37a416f

File tree

4 files changed

+54
-5
lines changed

4 files changed

+54
-5
lines changed

.github/release-drafter.yml

+48-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,56 @@
1+
name-template: "Version $RESOLVED_VERSION"
2+
tag-template: "$RESOLVED_VERSION"
3+
14
categories:
2-
- title: "⚠ Breaking Changes"
5+
- title: "🚨 Breaking changes"
6+
label: "breaking-change"
7+
8+
- title: "✨ New features"
9+
label: "new-feature"
10+
11+
- title: "🐛 Bug fixes"
12+
label: "bugfix"
13+
14+
- title: "🚀 Enhancements"
315
labels:
4-
- "breaking-change"
5-
- title: "⬆️ Dependencies"
16+
- "enhancement"
17+
- "refactor"
18+
- "performance"
19+
20+
- title: "🧰 Maintenance"
21+
labels:
22+
- "maintenance"
23+
- "ci"
24+
25+
- title: "📚 Documentation"
26+
labels:
27+
- "documentation"
28+
29+
- title: "⬆️ Dependency updates"
630
collapse-after: 1
731
labels:
832
- "dependencies"
33+
34+
version-resolver:
35+
major:
36+
labels:
37+
- "major"
38+
- "breaking-change"
39+
minor:
40+
labels:
41+
- "minor"
42+
- "new-feature"
43+
patch:
44+
labels:
45+
- "bugfix"
46+
- "ci"
47+
- "dependencies"
48+
- "documentation"
49+
- "enhancement"
50+
- "performance"
51+
- "refactor"
52+
default: patch
53+
954
template: |
1055
## What's Changed
1156

.github/workflows/pythonpublish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
pip install build twine
24+
- name: Set package version
25+
run: |
26+
version="${{ github.event.release.tag_name }}"
27+
sed -i "s/^version = \".*\"/version = \"${version}\"/" pyproject.toml
2428
- name: Build and publish
2529
env:
2630
TWINE_USERNAME: __token__

.github/workflows/release-drafter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
update_release_draft:
1010
runs-on: ubuntu-latest
1111
steps:
12-
# Drafts your next Release notes as Pull Requests are merged into "master"
12+
# Drafts your next Release notes as Pull Requests are merged into "main"
1313
- uses: release-drafter/[email protected]
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["setuptools>=77.0"]
44

55
[project]
66
name = "aioshelly"
7-
version = "13.4.0"
7+
version = "0.0.0"
88
license = "Apache-2.0"
99
description = "Asynchronous library to control Shelly devices."
1010
readme = "README.md"

0 commit comments

Comments
 (0)