Skip to content

Commit

Permalink
Move deployment to GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed May 24, 2020
1 parent 189b89d commit 6dd40b3
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 99 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
- uses: actions/checkout@v2
- run: python -m pip install black
- run: black --check --diff .

dist:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
- uses: actions/checkout@v2
- run: python setup.py sdist bdist_wheel
Expand All @@ -27,7 +27,7 @@ jobs:
standardjs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
Expand All @@ -37,8 +37,8 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
- uses: actions/checkout@v2
- run: sudo apt-get install -y gettext graphviz
- run: python setup.py develop
- run: python setup.py build_sphinx -W -b doctest -b html
Expand All @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Chrome
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types: [published]

jobs:
PyPI:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/checkout@v2
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel twine
- name: Build dist packages
run: python setup.py sdist bdist_wheel
- name: Upload packages
run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}

npm:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Upload packages
run: npm publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
83 changes: 0 additions & 83 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Documentation available at https://django-select2.readthedocs.io/.

.. |version| image:: https://img.shields.io/pypi/v/Django-Select2.svg
:target: https://pypi.python.org/pypi/Django-Select2/
.. |coverage| image:: https://codecov.io/gh/applegrew/django-select2/branch/master/graph/badge.svg
:target: https://codecov.io/gh/applegrew/django-select2
.. |coverage| image:: https://codecov.io/gh/codingjoe/django-select2/branch/master/graph/badge.svg
:target: https://codecov.io/gh/codingjoe/django-select2
.. |license| image:: https://img.shields.io/badge/license-APL2-blue.svg
:target: https://raw.githubusercontent.com/applegrew/django-select2/master/LICENSE.txt
:target: https://raw.githubusercontent.com/codingjoe/django-select2/master/LICENSE.txt
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Changelog

See `Github releases`_.

.. _Github releases: https://github.com/applegrew/django-select2/releases
.. _Github releases: https://github.com/codingjoe/django-select2/releases

All Contents
============
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ brew install redis
Now, to run the sample app, please execute:

```
git clone https://github.com/applegrew/django-select2.git
git clone https://github.com/codingjoe/django-select2.git
cd django-select2/example
python3 -m pip install -r requirements.txt
python3 manage.py migrate
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/applegrew/django-select2.git"
"url": "git://github.com/codingjoe/django-select2.git"
},
"keywords": [
"django",
Expand All @@ -24,9 +24,9 @@
"author": "Johannes Hoppe",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/applegrew/django-select2/issues"
"url": "https://github.com/codingjoe/django-select2/issues"
},
"homepage": "https://github.com/applegrew/django-select2#readme",
"homepage": "https://github.com/codingjoe/django-select2#readme",
"peerDependencies": {
"select2": "*",
"jquery": ">= 1.2"
Expand Down
2 changes: 1 addition & 1 deletion set_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
with open("package.json", "r+") as f:
data = json.load(f)
f.seek(0)
data["version"] = os.environ["TRAVIS_TAG"]
data["version"] = os.environ["GITHUB_REF"].rsplit("/")[-1]
json.dump(data, f)
f.truncate()
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author = Johannes Hoppe
author_email = info@johanneshoppe.com
description = Select2 option fields for Django
long_description = file: README.rst
url = https://github.com/applegrew/django-select2
url = https://github.com/codingjoe/django-select2
license = MIT
license_file = LICENSE
classifier =
Expand Down

0 comments on commit 6dd40b3

Please sign in to comment.