Skip to content

Commit 24d58bf

Browse files
authored
Adding release automation (#68)
* added release automation * install wheel before bdist command
1 parent 9f7a185 commit 24d58bf

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.22.3
2+
current_version = 0.22.4
33

44
[bumpversion:file:setup.py]
55

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: release
2+
on: [release]
3+
jobs:
4+
5+
source-build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-python@v2
10+
with:
11+
python-version: '3.7'
12+
- run: python setup.py sdist
13+
14+
wheel-build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.7'
21+
- run: pip install wheel
22+
- run: python setup.py bdist_wheel
23+
24+
docs-build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: '3.7'
31+
- run: pip install -r requirements-dev.txt -r requirements.txt
32+
- run: cd docs && DJANGO_SETTINGS_MODULE=test.settings make html
33+
34+
pypi-publish:
35+
needs: [source-build, wheel-build]
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}
40+
41+
gh-pages-publish:
42+
needs: [docs-build]
43+
uses: crazy-max/ghaction-github-pages@v2
44+
with:
45+
target_branch: gh-pages
46+
build_dir: docs/build/html
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
# built documents.
7575

7676
# The full version, including alpha/beta/rc tags.
77-
release = '0.22.3' # set by bumpversion
77+
release = '0.22.4' # set by bumpversion
7878

7979
# The short X.Y version.
8080
version = release.rsplit('.', 1)[0]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
setuptools.setup(
2222
name="django-declarative-apis",
23-
version="0.22.3", # set by bumpversion
23+
version="0.22.4", # set by bumpversion
2424
author="Drew Shafer",
2525
url="https://salesforce.com",
2626
description="Simple, readable, declarative APIs for Django",

0 commit comments

Comments
 (0)