Skip to content

Commit a339b1d

Browse files
authored
Release Automation (#15)
* ci:Release Automation * ci: naming ci to github_actions
1 parent a80a4e3 commit a339b1d

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ categories:
1010
- title: ":wrench: Fixes & Refactoring"
1111
labels: [bug, refactoring, bugfix, fix]
1212
- title: ":package: Build System & CI/CD"
13-
labels: [build, ci, testing]
13+
labels: [build, github_actions, testing]
1414
- title: ":boom: Breaking Changes"
1515
labels: [breaking]
1616
- title: ":pencil: Documentation"

.github/workflows/release-drafter.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,38 @@ on:
88

99
jobs:
1010
update_release_draft:
11+
strategy:
12+
matrix:
13+
python-version: ["3.9"]
1114
runs-on: ubuntu-latest
1215
steps:
13-
# Drafts your next Release notes as Pull Requests are merged into "master"
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/[email protected]
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install poetry
24+
run: make poetry-download
25+
1426
- uses: release-drafter/[email protected]
27+
id: release-drafter
1528
env:
1629
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Get current poetry version
32+
id: get-current-poetry-version
33+
run: |
34+
echo ::set-output name=POETRY_VERSION::$(bash -o pipefail -c "poetry version | awk '{ print \$2 }'")
35+
36+
- name: Update poetry version
37+
run: |
38+
poetry version ${{ steps.release-drafter.outputs.tag_name }}
39+
40+
- uses: EndBug/add-and-commit@v7
41+
if: steps.release-drafter.outputs.tag_name != steps.get-current-poetry-version.outputs.POETRY_VERSION
42+
with:
43+
author_name: ReleaseDrafter
44+
author_email: [email protected]
45+
message: "Bump Version to ${{ steps.release-drafter.outputs.tag_name }}"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
55

66
[tool.poetry]
77
name = "django-query-capture"
8-
version = "0.2.0"
8+
version = "v0.2.2"
99
description = "Shows queries, detects N+1 in Django, Simple to use, Can Customize Console Result"
1010
readme = "README.md"
1111
authors = ["AsheKR <[email protected]>"]

0 commit comments

Comments
 (0)