Skip to content

Commit

Permalink
feat: actions generate GitHub Release and changes (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
miketheman authored Mar 13, 2024
1 parent 0fc70de commit 5fc17f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ jobs:
# POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.POETRY_PYPI_TOKEN_TESTPYPI }}
# POETRY_REPOSITORIES_TESTPYPI_URL: https://test.pypi.org/legacy/

permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/nix-shell
Expand All @@ -134,3 +137,9 @@ jobs:
[[ "$GITHUB_REF_NAME" == "$POETRY_VERSION" ]] && exit 0 || exit 1
- run: nix-shell --run "poetry publish --build"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
make_latest: true
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

For future releases, see <https://github.com/Pylons/pyramid_openapi3/releases>

---

0.17.1 (2024-03-11)
-------------------

Expand Down
8 changes: 5 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# How to release a new version

1. Add a new version to CHANGELOG.md. Browse through https://github.com/Pylons/pyramid_openapi3/commits/main to see what was done since last release. Remember to set the correct release date.
1. Set the same version in `pyproject.toml`.
1. Set the new version in `pyproject.toml`.
1. `make lock`
1. `make tests`
1. `export VERSION=<new version>`
1. `git add -p && git ci -m "release $VERSION"`
1. `git push origin main` and wait for CircleCI to pass the build.
1. `git push origin main` and wait for GitHub Actions to pass the build.
1. `git tag $VERSION`
1. `git push --tags`

The Action should build & test the package, and then upload it to PyPI.
Then, automatically create a new GitHub Release with generated changelog.

0 comments on commit 5fc17f6

Please sign in to comment.