Skip to content

Commit 128b9ae

Browse files
authored
Merge pull request #8 from polygon-io/dev
Add release to drone
2 parents 8d6c93c + 960d10d commit 128b9ae

File tree

4 files changed

+56
-8
lines changed

4 files changed

+56
-8
lines changed

.drone.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
kind: pipeline
33
type: docker
4-
name: default
4+
name: review
55

66
platform:
77
os: linux
@@ -11,13 +11,50 @@ steps:
1111
- name: test
1212
image: python:3.7.5-alpine
1313
commands:
14-
- pip install -U tox
15-
- tox
14+
- pip install -U tox
15+
- tox
1616

1717
trigger:
1818
branch:
19-
- master
19+
- master
2020
event:
21-
- pull_request
21+
- pull_request
22+
23+
---
24+
kind: pipeline
25+
type: docker
26+
name: release
27+
28+
platform:
29+
os: linux
30+
arch: amd64
31+
32+
steps:
33+
- name: build
34+
image: python:3.7.5-alpine
35+
commands:
36+
- python setup.py sdist bdist_wheel
37+
environment:
38+
VERSION: ${DRONE_TAG##v}
39+
40+
- name: release
41+
image: python:3.7.5
42+
commands:
43+
- pip install --user --upgrade twine
44+
- ./upload
45+
environment:
46+
PASSWORD:
47+
from_secret: pypi_token
48+
USERNAME: __token__
49+
50+
trigger:
51+
event:
52+
- tag
53+
ref:
54+
- refs/tags/v*
55+
56+
---
57+
kind: signature
58+
hmac: c5572884fdd2183d7c63100530974a649f4607ee18c813570741d7a63f31cfae
2259

2360
...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://drone.polygon.io/api/badges/Polygon-io/polygon-client-python/status.svg)](https://drone.polygon.io/Polygon-io/polygon-client-python)
1+
[![Build Status](https://drone.polygon.io/api/badges/polygon-io/client-python/status.svg)](https://drone.polygon.io/polygon-io/client-python)
22

33
# Polygon Python Client - WebSocket & RESTful APIs
44

setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22

33
from setuptools import setup, find_packages
44

5+
import os
6+
import sys
7+
8+
version = os.getenv("VERSION")
9+
if not version:
10+
print("no version supplied")
11+
sys.exit(1)
12+
513
setup(
614
name="polygon-api-client",
7-
version="0.0.1",
15+
version=version,
816
description="Polygon API client",
917
author_email="[email protected]",
10-
url="https://github.com/Polygon-io/polygon-client-python",
18+
url="https://github.com/Polygon-io/client-python",
1119
packages=find_packages(),
1220
classifiers=[
1321
"License :: OSI Approved :: MIT License",

upload

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
python -m twine upload --username ${USERNAME} --password ${PASSWORD} dist/*

0 commit comments

Comments
 (0)