docs: release
This commit is contained in:
parent
7f20fb7ff9
commit
8f215c04fd
3 changed files with 39 additions and 1 deletions
|
@ -47,7 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## [1.0.0] - 2020-02-14
|
||||
- First release with matrix-client & http.server
|
||||
|
||||
[Unreleased]: https://github.com/nim65s/matrix-webhook/compare/v3.1.1...devel
|
||||
[Unreleased]: https://github.com/nim65s/matrix-webhook/compare/v3.1.1...master
|
||||
[3.1.1]: https://github.com/nim65s/matrix-webhook/compare/v3.1.0...v3.1.1
|
||||
[3.1.0]: https://github.com/nim65s/matrix-webhook/compare/v3.0.0...v3.1.0
|
||||
[3.0.0]: https://github.com/nim65s/matrix-webhook/compare/v2.0.0...v3.0.0
|
||||
|
|
18
docs/release.md
Normal file
18
docs/release.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Publish a new release
|
||||
|
||||
A github actions handle the build of the release archives, and push them to PyPI and Github Releases.
|
||||
To trigger it, we just need to:
|
||||
|
||||
1. use poetry to update the version number
|
||||
2. update the changelog
|
||||
3. git commit
|
||||
4. git tag
|
||||
5. git push
|
||||
6. git push --tags
|
||||
|
||||
|
||||
For this, an helper script is provided:
|
||||
|
||||
```bash
|
||||
./docs/release.sh [patch|minor|major|x.y.z]
|
||||
```
|
20
docs/release.sh
Executable file
20
docs/release.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash -eux
|
||||
# ./docs/release.sh [patch|minor|major|x.y.z]
|
||||
|
||||
[[ $(basename $PWD) == docs ]] && cd ..
|
||||
|
||||
|
||||
OLD=$(poetry version -s)
|
||||
|
||||
poetry version $1
|
||||
|
||||
NEW=$(poetry version -s)
|
||||
DATE=$(date +%Y-%m-%d)
|
||||
|
||||
sed -i "/^## \[Unreleased\]/a \\\n## [$NEW] - $DATE" CHANGELOG.md
|
||||
sed -i "/^\[Unreleased\]/s/$OLD/$NEW/" CHANGELOG.md
|
||||
sed -i "/^\[Unreleased\]/a [$NEW] https://github.com/nim65s/matrix-webhook/compare/v$OLD...v$NEW" CHANGELOG.md
|
||||
|
||||
echo git add pyproject.toml CHANGELOG.md
|
||||
echo git commit -m "Release v$NEW"
|
||||
echo git tag -s "v$NEW" -m "Release v$NEW"
|
Loading…
Reference in a new issue