-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from awtkns/rc_0.5
Release Candidate v0.5.0
- Loading branch information
Showing
8 changed files
with
138 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from os import environ | ||
from pathlib import Path | ||
|
||
from github import Github | ||
from github.GitRelease import GitRelease | ||
|
||
GITHUB_REPOSITORY = environ.get('GITHUB_REPOSITORY') | ||
GITHUB_TOKEN = environ.get('GITHUB_TOKEN') | ||
FILE_PATH = "docs/en/docs/releases.md" | ||
COMMIT_MESSAGE = "🤖 auto update releases.md" | ||
|
||
gh = Github(GITHUB_TOKEN) | ||
|
||
|
||
def generate_header(r: GitRelease, separator: bool = False): | ||
header = '' | ||
if separator: | ||
header += "\n\n---\n" | ||
|
||
return header + f""" | ||
## [{r.title}]({r.html_url}){" { .releases } "} | ||
{r.created_at.date()} | ||
""" | ||
|
||
|
||
if __name__ == '__main__': | ||
repo = gh.get_repo(REPO) | ||
|
||
content = '' | ||
first = False | ||
for r in repo.get_releases(): | ||
if not r.draft: | ||
content += generate_header(r, first) | ||
content += r.body | ||
first = True | ||
|
||
contents = repo.get_contents(FILE_PATH) | ||
repo.update_file( | ||
contents.path, | ||
message=COMMIT_MESSAGE, | ||
content=content, | ||
sha=contents.sha | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Update Release Docs | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
- name: Updating Releases Documentation | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pygithub | ||
python .github/scripts/releases.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block announce %} | ||
<a class="announce" href="/releases/#v050-pagination" target="_blank"> | ||
🎉 v0.5.0 - Pagination Released 🎉 | ||
</a> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from setuptools import setup, find_packages | ||
|
||
VERSION = '0.4.3' | ||
VERSION = '0.5.0' | ||
|
||
setup( | ||
name='fastapi-crudrouter', | ||
version=VERSION, | ||
author='Adam Watkins', | ||
author_email='[email protected]', | ||
packages=find_packages(exclude=('tests', 'tests.implementations')), | ||
packages=find_packages(exclude=('tests.*', 'tests')), | ||
url='https://github.com/awtkns/fastapi-crudrouter', | ||
documentation='https://fastapi-crudrouter.awtkns.com/', | ||
license='MIT', | ||
|
@@ -16,7 +16,7 @@ | |
long_description_content_type="text/markdown", | ||
install_requires=["fastapi"], | ||
python_requires='>=3.6', | ||
keywords=['fastapi', 'crud', 'restful', 'routing', 'generator'], | ||
keywords=['fastapi', 'crud', 'restful', 'routing', 'generator', 'crudrouter'], | ||
classifiers=[ | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
|
@@ -25,6 +25,7 @@ | |
"Topic :: Software Development :: Libraries :: Application Frameworks", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Software Development :: Code Generators", | ||
"Topic :: Software Development", | ||
"Typing :: Typed", | ||
"Development Status :: 4 - Beta", | ||
|
36eaa63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: