Skip to content

Commit fd90f8b

Browse files
committed
ops(release): add Makefile targets
1 parent 628d8fc commit fd90f8b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ build
1212
docs/examples
1313
src/init_python_project/template
1414
src/init_python_project/copier.yaml
15+
.env

Makefile

+16-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ test-all: ## run all tests
106106
pytest ${PYTEST_ARGS}
107107

108108

109-
.PHONY: build install-build
109+
.PHONY: build install-build copy-template build-clean
110110
PKGNAME=init_python_project
111111
PKGDIR=src/${PKGNAME}
112112
BUILDDIR?=build/dist
@@ -125,6 +125,21 @@ copy-template:
125125
build-clean: ## remove build artifacts
126126
rm -rf ${BUILDDIR} ${PKGDIR}/template ${PKGDIR}/copier.yaml
127127

128+
.PHONY: release release-test release-tag release-pypi release-github
129+
release: release-test release-tag build release-pypi release-github
130+
release-test:
131+
@nox
132+
release-tag:
133+
@git tag -m 'bump version to '`init-python-project --version` `init-python-project --version` --sign
134+
release-pypi:
135+
twine upload ${BUILDDIR}/*
136+
release-github:
137+
@git push --tags
138+
gh release create `init-python-project --version` \
139+
--title `init-python-project --version` \
140+
--notes '*[see changes](https://github.com/jannismain/python-project-template/blob/main/CHANGELOG.md#'`init-python-project --version | tr -d .`'---'`date -Idate`')*'
141+
gh release upload `init-python-project --version` ${BUILDDIR}/*.tar.gz ${BUILDDIR}/*.whl
142+
128143

129144
.PHONY: help
130145
# a nice way to document Makefiles, found here: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html

0 commit comments

Comments
 (0)