Skip to content

Commit c26370f

Browse files
committed
fix: semantic release
1 parent 51ebb79 commit c26370f

File tree

4 files changed

+45
-15
lines changed

4 files changed

+45
-15
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,25 @@ jobs:
2020
fetch-depth: 0
2121
tags: true
2222

23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.x
27+
28+
- name: Install semantic-release
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install python-semantic-release[github]
32+
2333
- name: Get tag version
2434
id: get_version
2535
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
2636

27-
- name: Python Semantic Release
28-
uses: python-semantic-release/python-semantic-release@master
29-
with:
30-
github_token: '${{ secrets.GH_TOKEN }}'
31-
command: publish
37+
- name: Create GitHub Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
40+
run: |
41+
semantic-release publish
3242
3343
upload-to-pypi:
3444
runs-on: ubuntu-latest

.semantic-release.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[build]
2+
command = "hatch build"
3+
path = "dist/"
4+
5+
[changelog]
6+
exclude_commit_types = [
7+
"ci",
8+
"build",
9+
"chore",
10+
"docs",
11+
"style",
12+
"refactor",
13+
"perf",
14+
"test",
15+
]
16+
17+
[changelog.environment]
18+
start_reference = "HEAD~1"
19+
20+
[changelog.environment.github]
21+
repo = "agusmakmun/django-markdown-editor"
22+
23+
[upload_to_release]
24+
enabled = true
25+
build_artifacts = true
26+
27+
[upload_to_pypi]
28+
enabled = false

martor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.7.4"
1+
__version__ = "1.7.5"
22
__release_date__ = "26-Jul-2025"
33
__author__ = "Agus Makmun (Summon Agus)"
44
__author_email__ = "[email protected]"

pyproject.toml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "martor"
7-
version = "1.7.4"
7+
version = "1.7.5"
88
description = "Django Markdown Editor"
99
readme = "README.md"
1010
license = { text = "GPL-3.0" }
@@ -82,14 +82,6 @@ include = [
8282
"/martor/__init__.py",
8383
]
8484

85-
[tool.semantic_release]
86-
version_variable = "martor/__init__.py:__version__"
87-
version_toml = ["pyproject.toml", "project.version"]
88-
build_command = "hatch build"
89-
dist_path = "dist/"
90-
version_pattern = "v{version}"
91-
tag_format = "v{version}"
92-
9385
# Testing configuration
9486
[tool.hatch.envs.test]
9587
dependencies = [

0 commit comments

Comments
 (0)