Skip to content

Commit cea8a63

Browse files
committed
Prerelease workflow
1 parent 6838728 commit cea8a63

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/pre_release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [prereleased]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: "3.7"
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine numpy yapf
20+
- name: Check formatting
21+
run: yapf -p -r --diff -e '*/pycocotools_sa' superannotate
22+
- name: Create distribution files
23+
run: python setup.py sdist
24+
- name: Publish distribution to PyPI
25+
if: startsWith(github.ref, 'refs/tags')
26+
uses: pypa/gh-action-pypi-publish@master
27+
with:
28+
password: ${{ secrets.pypi_password }}
29+
- name: Push Docker image to Docker Hub
30+
uses: docker/build-push-action@v1
31+
with:
32+
username: ${{ secrets.DOCKER_USERNAME }}
33+
password: ${{ secrets.DOCKER_PASSWORD }}
34+
repository: superannotate/pythonsdk
35+
tag_with_ref: true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Upload Python Package (SDIST)
1+
name: Release
22

33
on:
44
release:
5-
types: [created]
5+
types: [released]
66

77
jobs:
88
deploy:

0 commit comments

Comments
 (0)