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

feature: release automation #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
45 changes: 45 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
22 changes: 20 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <dev@lhy.kr>"]
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"
Expand Down