Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: actions generate GitHub Release and changes #226

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading