Skip to content

Commit 0ab9b6f

Browse files
committed
Merge branch 'main' of github.com:mxstack/mxmake
2 parents 68c8297 + 5f7ebcc commit 0ab9b6f

File tree

12 files changed

+144
-16
lines changed

12 files changed

+144
-16
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Docs
22

3-
on: [push, workflow_dispatch]
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
46

57
jobs:
68
docs:

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Lint
22

3-
on: [push]
3+
on:
4+
push:
5+
workflow_call:
6+
workflow_dispatch:
47

58
jobs:
69
lint:

.github/workflows/release.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
name: Build & upload PyPI package
3+
4+
on:
5+
push:
6+
branches: [main]
7+
tags: ["*"]
8+
release:
9+
types:
10+
- published
11+
workflow_dispatch:
12+
13+
14+
jobs:
15+
tests:
16+
uses: "./.github/workflows/test.yml"
17+
lint:
18+
uses: "./.github/workflows/lint.yml"
19+
variants:
20+
uses: "./.github/workflows/variants.yml"
21+
typecheck:
22+
uses: "./.github/workflows/typecheck.yml"
23+
24+
# Always build & lint package.
25+
build-package:
26+
name: Build & verify package
27+
needs:
28+
- lint
29+
- tests
30+
- variants
31+
- typecheck
32+
runs-on: ubuntu-latest
33+
permissions:
34+
attestations: write
35+
id-token: write
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
persist-credentials: false
42+
43+
- uses: hynek/build-and-inspect-python-package@v2
44+
with:
45+
attest-build-provenance-github: 'true'
46+
47+
# Upload to Test PyPI on every commit on main.
48+
release-test-pypi:
49+
name: Publish in-dev package to test.pypi.org
50+
environment: release-test-pypi
51+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
52+
runs-on: ubuntu-latest
53+
needs:
54+
- build-package
55+
permissions:
56+
id-token: write
57+
58+
steps:
59+
- name: Download packages built by build-and-inspect-python-package
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: Packages
63+
path: dist
64+
65+
- name: Upload package to Test PyPI
66+
uses: pypa/gh-action-pypi-publish@release/v1
67+
with:
68+
repository-url: https://test.pypi.org/legacy/
69+
70+
# Upload to real PyPI on GitHub Releases.
71+
release-pypi:
72+
name: Publish released package to pypi.org
73+
environment: release-pypi
74+
if: github.event.action == 'published'
75+
runs-on: ubuntu-latest
76+
needs:
77+
- build-package
78+
permissions:
79+
id-token: write
80+
81+
steps:
82+
- name: Download packages built by build-and-inspect-python-package
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: Packages
86+
path: dist
87+
88+
- name: Upload package to PyPI
89+
uses: pypa/gh-action-pypi-publish@release/v1
90+
docs:
91+
needs:
92+
- release-pypi
93+
uses: "./.github/workflows/docs.yml"

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Tests
22

3-
on: [push]
3+
on:
4+
push:
5+
workflow_call:
6+
workflow_dispatch:
47

58
jobs:
69
build:

.github/workflows/typecheck.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Type checks
22

3-
on: [push]
3+
on:
4+
push:
5+
workflow_call:
6+
workflow_dispatch:
47

58
jobs:
69
build:

.github/workflows/variants.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Python/VENV/Installer Variants
22

3-
on: [push]
3+
on:
4+
push:
5+
workflow_call:
6+
workflow_dispatch:
47

58
jobs:
69
build:

CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Changelog
22

3-
## 1.0a9 (unreleased)
3+
## 1.1.0 (unreleased)
44

5+
- Feature: Add target `zope-adduser` to create an emergency user.
6+
7+
## 1.0 (2025-02-11)
8+
9+
- Chore: Add release workflow.
510

611
- Fix `zope.mk`, wrong config file was passed to zconsole.
712
Now zope-debug and zope-runscript are functional.

pyproject.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[project]
22
name = "mxmake"
33
description = "Generates a Python project-specific Makefile by using an extensible library of configurable Makefile snippets."
4-
version = "1.0a9.dev0"
4+
version = "1.1.0.dev0"
55
keywords = ["development", "deployment", "make"]
66
authors = [
77
{name = "MX Stack Developers", email = "[email protected]" }
88
]
99
requires-python = ">=3.9"
1010
license = { text = "BSD 2-Clause License" }
1111
classifiers = [
12-
"Development Status :: 3 - Alpha",
12+
"Development Status :: 5 - Production/Stable",
1313
"Intended Audience :: Developers",
1414
"Topic :: Software Development :: Build Tools",
1515
"License :: OSI Approved :: BSD License",
1616
"Operating System :: OS Independent",
1717
"Programming Language :: Python",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
2221
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2323
]
2424
dependencies = [
2525
"inquirer",
@@ -85,11 +85,8 @@ lines_after_imports = 2
8585

8686
[tool.mypy]
8787
ignore_missing_imports = true
88-
python_version = "3.8"
89-
exclude = "src/mxmake/templates/plone-site.py"
88+
python_version = "3.9"
9089

9190
[tool.ruff]
9291
# Exclude a variety of commonly ignored directories.
93-
exclude = [
94-
"src/mxmake/templates/plone-site.py",
95-
]
92+
exclude = []

src/mxmake/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ class GHActionsTypecheck(GHActionsTemplate):
498498
class PloneSitePy(MxIniBoundTemplate):
499499
description: str = "Script to create or purge a Plone site"
500500
target_name = "plone-site.py"
501-
template_name = "plone-site.py"
501+
template_name = "plone-site.py.tpl"
502502

503503
@property
504504
def target_folder(self) -> Path:

0 commit comments

Comments
 (0)