Skip to content

Commit

Permalink
Merge pull request #4 from bellmann/develop
Browse files Browse the repository at this point in the history
chore(release): version 0.0.5
  • Loading branch information
ju5t authored Dec 10, 2020
2 parents 4c691e1 + 5973f2b commit 7c8ee0f
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 10 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish

on:
release:
types: [released]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tools
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Package and Upload
env:
PACKAGE_VERSION: ${{ github.event.release.tag_name }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test

on:
push:
branches-ignore:
- master
pull_request:
branches: [ develop ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with tox
run: |
tox -e setup,flake8
4 changes: 0 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
- python -V
- pip install tox
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
artifacts:
paths:
- htmlcov
expire_in: 2 days

test:python27:
<<: *test-commands
Expand Down
6 changes: 4 additions & 2 deletions drf_simplepermissions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from .permissions import * # noqa
import os
from .permissions import is_demo
from .permissions import SimplePermissions


__version__ = '0.0.1'
__version__ = os.environ.get('PACKAGE_VERSION', '0.0.0'),
__all__ = ['SimplePermissions', 'is_demo']
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import os
from setuptools import setup

setup(name='drf-simplepermissions',
version='0.0.4',
version=os.environ.get('PACKAGE_VERSION', '0.0.0'),
description='SimplePermissions checks against a list of permissions',
url='https://git.sensson.net/bellmann/python-drf-simplepermissions',
url='https://github.com/bellmann/python-drf-simplepermissions',
author='Bellmann BV',
author_email='ton@bellmann.nl',
author_email='opensource@bellmann.nl',
packages=['drf_simplepermissions'],
install_requires=[
'django',
'djangorestframework',
],
python_requires='>=3.4',
zip_safe=False)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ commands =

[testenv:flake8]
deps = flake8
commands = flake8 gongchang
commands = flake8 drf_simplepermissions

0 comments on commit 7c8ee0f

Please sign in to comment.