Skip to content

Commit 7de2bb1

Browse files
committed
Add deploy stages for github and travis
1 parent 1e329a5 commit 7de2bb1

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.travis.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ stages:
55
- name: "lint"
66
- name: "test"
77
- name: "integration"
8-
# - name: "deploy"
9-
# if: "branch = master"
8+
- name: "deploy-github"
9+
if: "tag IS present"
10+
- name: "deploy-pypi"
11+
if: "tag IS present"
1012

1113
language: "python"
1214
python:
@@ -96,3 +98,26 @@ jobs:
9698
- "invoke integration-tests"
9799
env: "NETBOX_VERSION=v2.8"
98100
python: 3.7
101+
102+
- stage: "deploy-github"
103+
before_script:
104+
- "pip install poetry"
105+
script:
106+
- "poetry version $TRAVIS_TAG"
107+
- "poetry build"
108+
deploy:
109+
provider: "releases"
110+
api_key: "$GITHUB_AUTH_TOKEN"
111+
file_glob: true
112+
file: "dist/*"
113+
skip_cleanup: true
114+
"on":
115+
all_branches: true
116+
117+
- stage: "deploy-pypi"
118+
before_script:
119+
- "pip install poetry"
120+
script:
121+
- "poetry version $TRAVIS_TAG"
122+
- "poetry config pypi-token.pypi $PYPI_TOKEN"
123+
- "poetry publish --build"

0 commit comments

Comments
 (0)