forked from EI-CoreBioinformatics/mikado
-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (64 loc) · 2.14 KB
/
publish-to-test-pypi.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
64
name: Upload to PyPI and TestPyPI
on:
release:
types: [published]
jobs:
build-and-publish:
name: Build the Mikado release and publish to TestPyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/checkout@v2
- name: Cache conda
id: cache-miniconda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ hashFiles('./environment.yml') }}
# - name: Install system development tools
# run: |
# export DEBIAN_FRONTEND=noninteractive
# sudo apt update
# sudo apt install -y build-essential zlib1g-dev zlib1g
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
miniconda-version: "latest"
environment-file: ./environment.yml
mamba-version: "*"
use-mamba: true
channels: bioconda, conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
activate-environment: "test"
auto-activate-base: false
- name: Install dependencies
run: |
gcc --help
pip install -r requirements.txt
pip install Cython
- name: Install Mikado
run: >-
python -m pip install build --user
- name: Build sdist
run: >-
python -m build --sdist --outdir dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://upload.pypi.org/legacy/