Skip to content

Commit 6dd40b3

Browse files
committed
Move deployment to GitHub action
1 parent 189b89d commit 6dd40b3

File tree

10 files changed

+48
-99
lines changed

10 files changed

+48
-99
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ jobs:
1010
black:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/setup-python@v1
13+
- uses: actions/setup-python@v2
1414
- uses: actions/checkout@v2
1515
- run: python -m pip install black
1616
- run: black --check --diff .
1717

1818
dist:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/setup-python@v1
21+
- uses: actions/setup-python@v2
2222
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
2323
- uses: actions/checkout@v2
2424
- run: python setup.py sdist bdist_wheel
@@ -27,7 +27,7 @@ jobs:
2727
standardjs:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v1
30+
- uses: actions/checkout@v2
3131
- uses: actions/setup-node@v1
3232
with:
3333
node-version: '12.x'
@@ -37,8 +37,8 @@ jobs:
3737
docs:
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/setup-python@v1
41-
- uses: actions/checkout@v1
40+
- uses: actions/setup-python@v2
41+
- uses: actions/checkout@v2
4242
- run: sudo apt-get install -y gettext graphviz
4343
- run: python setup.py develop
4444
- run: python setup.py build_sphinx -W -b doctest -b html
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: Set up Python ${{ matrix.python-version }}
62-
uses: actions/setup-python@v1
62+
uses: actions/setup-python@v2
6363
with:
6464
python-version: ${{ matrix.python-version }}
6565
- name: Install Chrome

.github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
PyPI:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-python@v2
12+
- uses: actions/checkout@v2
13+
- name: Install Python dependencies
14+
run: python -m pip install --upgrade pip setuptools wheel twine
15+
- name: Build dist packages
16+
run: python setup.py sdist bdist_wheel
17+
- name: Upload packages
18+
run: python -m twine upload dist/*
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
22+
23+
npm:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/setup-node@v1
27+
- uses: actions/checkout@v2
28+
- name: Upload packages
29+
run: npm publish
30+
env:
31+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}

.travis.yml

-83
This file was deleted.

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Documentation available at https://django-select2.readthedocs.io/.
2424

2525
.. |version| image:: https://img.shields.io/pypi/v/Django-Select2.svg
2626
:target: https://pypi.python.org/pypi/Django-Select2/
27-
.. |coverage| image:: https://codecov.io/gh/applegrew/django-select2/branch/master/graph/badge.svg
28-
:target: https://codecov.io/gh/applegrew/django-select2
27+
.. |coverage| image:: https://codecov.io/gh/codingjoe/django-select2/branch/master/graph/badge.svg
28+
:target: https://codecov.io/gh/codingjoe/django-select2
2929
.. |license| image:: https://img.shields.io/badge/license-APL2-blue.svg
30-
:target: https://raw.githubusercontent.com/applegrew/django-select2/master/LICENSE.txt
30+
:target: https://raw.githubusercontent.com/codingjoe/django-select2/master/LICENSE.txt

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Changelog
183183

184184
See `Github releases`_.
185185

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

188188
All Contents
189189
============

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ brew install redis
1313
Now, to run the sample app, please execute:
1414

1515
```
16-
git clone https://github.com/applegrew/django-select2.git
16+
git clone https://github.com/codingjoe/django-select2.git
1717
cd django-select2/example
1818
python3 -m pip install -r requirements.txt
1919
python3 manage.py migrate

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"repository": {
1717
"type": "git",
18-
"url": "git://github.com/applegrew/django-select2.git"
18+
"url": "git://github.com/codingjoe/django-select2.git"
1919
},
2020
"keywords": [
2121
"django",
@@ -24,9 +24,9 @@
2424
"author": "Johannes Hoppe",
2525
"license": "Apache-2.0",
2626
"bugs": {
27-
"url": "https://github.com/applegrew/django-select2/issues"
27+
"url": "https://github.com/codingjoe/django-select2/issues"
2828
},
29-
"homepage": "https://github.com/applegrew/django-select2#readme",
29+
"homepage": "https://github.com/codingjoe/django-select2#readme",
3030
"peerDependencies": {
3131
"select2": "*",
3232
"jquery": ">= 1.2"

set_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
with open("package.json", "r+") as f:
88
data = json.load(f)
99
f.seek(0)
10-
data["version"] = os.environ["TRAVIS_TAG"]
10+
data["version"] = os.environ["GITHUB_REF"].rsplit("/")[-1]
1111
json.dump(data, f)
1212
f.truncate()

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author = Johannes Hoppe
44
author_email = [email protected]
55
description = Select2 option fields for Django
66
long_description = file: README.rst
7-
url = https://github.com/applegrew/django-select2
7+
url = https://github.com/codingjoe/django-select2
88
license = MIT
99
license_file = LICENSE
1010
classifier =

0 commit comments

Comments
 (0)