Skip to content

Commit f43fd11

Browse files
authored
feat(ci): add manual semantic-release (#128)
I'll switch it to be automated on push to `master` at some point.
1 parent c24c299 commit f43fd11

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: conventional-pr
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
branches:
9+
- master
10+
jobs:
11+
lint-pr:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
# check for the most recent release: https://github.com/CondeNast/conventional-pull-request-action/releases
16+
- uses: CondeNast/[email protected]
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - master
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
environment: release
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Python Semantic Release
18+
# https://github.com/relekang/python-semantic-release/releases
19+
uses: relekang/[email protected]
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
pypi_token: ${{ secrets.PYPI_TOKEN }}

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,13 @@ coverage = "4.5.4"
3131
django-extensions = "2.2.3"
3232
factory-boy = "2.12.0"
3333
dj-database-url = "0.5.0"
34+
35+
[build-system]
36+
requires = ["poetry_core>=1.0.0"]
37+
build-backend = "poetry.core.masonry.api"
38+
39+
[tool.semantic_release]
40+
branch = "master"
41+
version_toml = "pyproject.toml:tool.poetry.version"
42+
version_variable = "django-object-actions/__init__.py:__version__"
43+
build_command = "pip install poetry && poetry build"

0 commit comments

Comments
 (0)