-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 2 KB
/
ci.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: "release"
on: [push]
jobs:
release:
name: "Release package"
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7]
numpy: [1.15]
steps:
- uses: actions/checkout@v2
- name: "Setup Python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "Setup Conda"
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge,bioconda,defaults
conda-build-version: "3.21.7"
- name: "Install Conda client"
run: conda install -c anaconda anaconda-client
- name: "Build Conda package"
run: |
conda build --no-build-id --numpy ${{ matrix.numpy }} --output-folder . .
conda convert -p osx-64 linux-64/*.tar.bz2
- name: "Upload Conda package"
run: |
$CONDA/bin/anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --force -u stracquadaniolab --no-progress linux-64/*.tar.bz2
$CONDA/bin/anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --force -u stracquadaniolab --no-progress osx-64/*.tar.bz2
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: "Push Docker image to GitHub Container Registry"
uses: docker/build-push-action@v2
with:
file: ./docker/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:v0.11.0, ghcr.io/${{ github.repository }}:latest
- name: "Install PIP required packages"
run: pip install wheel twine
- name: "Build PIP package"
run: python setup.py sdist bdist_wheel
- name: "Publish package on PyPi"
run: twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} dist/*