From 9704d654f8232b9ebc8711c383b095ed9a25eed1 Mon Sep 17 00:00:00 2001 From: Ashe Date: Wed, 19 Jan 2022 13:45:03 +0900 Subject: [PATCH 1/2] feature: release automation --- .github/release-drafter.yml | 26 ++++++++++++++++ .github/workflows/deploy.yml | 19 +++++++++++ .github/workflows/release_drafter.yml | 45 +++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/release_drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..e846a49 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,26 @@ +# Release drafter configuration https://github.com/release-drafter/release-drafter#configuration +# Emojis were chosen to match the https://gitmoji.carloscuesta.me/ + +name-template: "v$NEXT_PATCH_VERSION" +tag-template: "v$NEXT_PATCH_VERSION" + +categories: + - title: ":rocket: Features" + labels: [enhancement, feature] + - title: ":wrench: Fixes & Refactoring" + labels: [bug, refactoring, bugfix, fix] + - title: ":package: Build System & CI/CD" + labels: [build, github_actions, testing] + - title: ":boom: Breaking Changes" + labels: [breaking] + - title: ":pencil: Documentation" + labels: [documentation] + - title: ":arrow_up: Dependencies updates" + labels: [dependencies] + +template: | + ## What’s Changed + + $CHANGES + + $CONTRIBUTORS diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1efa22e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,19 @@ +name: deploy + +on: + release: + types: ["published"] + +jobs: + pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.9 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml new file mode 100644 index 0000000..b45d8b2 --- /dev/null +++ b/.github/workflows/release_drafter.yml @@ -0,0 +1,45 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + +jobs: + update_release_draft: + strategy: + matrix: + python-version: ["3.9"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2.3.1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install poetry + run: make poetry-download + + - uses: release-drafter/release-drafter@v5.17.5 + id: release-drafter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get current poetry version + id: get-current-poetry-version + run: | + echo ::set-output name=POETRY_VERSION::$(bash -o pipefail -c "poetry version | awk '{ print \$2 }'") + + - name: Update poetry version + run: | + poetry version ${{ steps.release-drafter.outputs.tag_name }} + + - uses: EndBug/add-and-commit@v7 + if: steps.release-drafter.outputs.tag_name != steps.get-current-poetry-version.outputs.POETRY_VERSION + with: + author_name: ReleaseDrafter + author_email: https://lhy.kr + message: "Bump Version to ${{ steps.release-drafter.outputs.tag_name }}" From 799193829cdd80521d4fe509d469934e8d5b969c Mon Sep 17 00:00:00 2001 From: Ashe Date: Wed, 19 Jan 2022 14:00:53 +0900 Subject: [PATCH 2/2] feature: update poetry build system --- pyproject.toml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dd3059d..d364f60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,29 @@ +# Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/ +[build-system] +requires = ["poetry_core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + [tool.poetry] name = "django-quill-editor" -version = "0.1.0" -description = "" +version = "0.1.36" +description = "Integrate Quill editor with Django project." +readme = "README.me" authors = ["lhy "] +license = "MIT" +repository = "https://github.com/LeeHanYeong/django-quill-editor" +homepage = "https://github.com/LeeHanYeong/django-quill-editor" packages = [ { include = "django_quill" }, ] +classifiers=[ + "Framework :: Django", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Development Status :: 4 - Beta", +] [tool.poetry.dependencies] python = "^3.9"