Skip to content

Commit 7c8ee0f

Browse files
authored
Merge pull request #4 from bellmann/develop
chore(release): version 0.0.5
2 parents 4c691e1 + 5973f2b commit 7c8ee0f

File tree

6 files changed

+67
-10
lines changed

6 files changed

+67
-10
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.8
16+
- name: Install Tools
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Package and Upload
21+
env:
22+
PACKAGE_VERSION: ${{ github.event.release.tag_name }}
23+
TWINE_USERNAME: __token__
24+
TWINE_PASSWORD: ${{ secrets.PYPI }}
25+
run: |
26+
python setup.py sdist bdist_wheel
27+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
pull_request:
8+
branches: [ develop ]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ['3.6', '3.7', '3.8']
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install tox
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
- name: Test with tox
29+
run: |
30+
tox -e setup,flake8

.gitlab-ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
- python -V
66
- pip install tox
77
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
8-
artifacts:
9-
paths:
10-
- htmlcov
11-
expire_in: 2 days
128

139
test:python27:
1410
<<: *test-commands

drf_simplepermissions/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
from .permissions import * # noqa
1+
import os
2+
from .permissions import is_demo
3+
from .permissions import SimplePermissions
24

35

4-
__version__ = '0.0.1'
6+
__version__ = os.environ.get('PACKAGE_VERSION', '0.0.0'),
57
__all__ = ['SimplePermissions', 'is_demo']

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
import os
12
from setuptools import setup
23

34
setup(name='drf-simplepermissions',
4-
version='0.0.4',
5+
version=os.environ.get('PACKAGE_VERSION', '0.0.0'),
56
description='SimplePermissions checks against a list of permissions',
6-
url='https://git.sensson.net/bellmann/python-drf-simplepermissions',
7+
url='https://github.com/bellmann/python-drf-simplepermissions',
78
author='Bellmann BV',
8-
author_email='ton@bellmann.nl',
9+
author_email='opensource@bellmann.nl',
910
packages=['drf_simplepermissions'],
1011
install_requires=[
1112
'django',
1213
'djangorestframework',
1314
],
15+
python_requires='>=3.4',
1416
zip_safe=False)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ commands =
2121

2222
[testenv:flake8]
2323
deps = flake8
24-
commands = flake8 gongchang
24+
commands = flake8 drf_simplepermissions

0 commit comments

Comments
 (0)