Skip to content

Commit 0937d0e

Browse files
author
rllin
authored
[BACKEND-828] github actions publish package upon release creation (#34)
* Create python-package.yml * fix syntax errors * remove unused function * env key * test against prod * let tox manage pyenv for now * tox gh actions * install python * environ chooser * fix * move environ to conftest * environ * remove import * fix * fix * prod * fix * no comments * fix * fix * fix * fix * yapf in action * yapf * address comments * publish workflow * dev * 2.4.2dev * 2.4.2rc1 * install rc2 * works, reset
1 parent c545e12 commit 0937d0e

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Triggers a pypi publication when a release is created
2+
3+
name: Publish Python Package
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
deploy:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine
26+
27+
- name: Build and publish
28+
env:
29+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
twine upload dist/*
34+
35+
- name: Update help docs
36+
run: |
37+
python setup.py install
38+
python ./tools/api_reference_generator.py ${{ secrets.HELPDOCS_API_KEY }}

tests/integration/test_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ def test_label_bulk_deletion(project, rand_gen):
102102

103103
assert set(project.labels()) == {l2}
104104

105-
dataset.delete()
105+
dataset.delete()

0 commit comments

Comments
 (0)