-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.21 KB
/
deploy.yaml
File metadata and controls
49 lines (42 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy CellRegMap
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get tag name
run: |
echo ${GITHUB_REF##*/}
# clone the repo to the local directory
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
# In the future, run the tests here
# - name: Test with pytest
# run: |
# python -m unittest test/
# Deploy to pypi
- name: Build and publish to pypi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install wheel twine
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build and deploy the docker
- name: Build and publish to docker
run: |
DOCKER_TAG=annasecuomo/cellregmap:${GITHUB_REF##*/}
docker build -t $DOCKER_TAG .
docker push $DOCKER_TAG