docs: add tutorial to generate release with its changelog
This commit is contained in:
34
doc/tutorials/generate-release-with-changelog.md
Normal file
34
doc/tutorials/generate-release-with-changelog.md
Normal file
@ -0,0 +1,34 @@
|
||||
# Générer une release pour son projet
|
||||
|
||||
Afin de générer une release pour votre projet (exemple: https://forge.cadoles.com/Cadoles/mktools/releases/tag/2023.8.23-stable.1545.643e170) ainsi que le fichier `CHANGELOG.md` associé à votre historique Git, vous pouvez intégrer à votre `Makefile` les tâches suivantes:
|
||||
|
||||
```makefile
|
||||
MKT_GITEA_RELEASE_ORG ?= MyOrg # Propriétaire (organisation ou utilsateur) du projet Gitea
|
||||
MKT_GITEA_RELEASE_PROJECT ?= MyProject # Nom du projet Gitea
|
||||
|
||||
.PHONY: release
|
||||
release:
|
||||
git tag $(MKT_PROJECT_VERSION) && git push --tags
|
||||
$(MAKE) update-changelog
|
||||
$(MAKE) MKT_GITEA_RELEASE_ATTACHMENTS="$(MKT_GITEA_RELEASE_ATTACHMENTS) CHANGELOG.md" \
|
||||
MKT_GITEA_RELEASE_COMMIT_TARGET="$(MKT_PROJECT_VERSION)" \
|
||||
mkt-gitea-release
|
||||
|
||||
.PHONY: update-changelog
|
||||
update-changelog:
|
||||
$(MAKE) changelog
|
||||
git add CHANGELOG.md
|
||||
git commit -m "chore: update changelog"
|
||||
git push
|
||||
|
||||
.PHONY: changelog
|
||||
changelog:
|
||||
git fetch --prune-tags
|
||||
$(MAKE) MKT_GIT_CHGLOG_PROJECT_ORG=$(MKT_GITEA_RELEASE_ORG) MKT_GIT_CHGLOG_PROJECT_NAME=$(MKT_GITEA_RELEASE_PROJECT) mkt-changelog
|
||||
```
|
||||
|
||||
Pour générer une release sur votre projet, il vous suffira ensuite de faire:
|
||||
|
||||
```shell
|
||||
make release
|
||||
```
|
Reference in New Issue
Block a user