-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (58 loc) · 1.7 KB
/
build.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
name: RNA-seq normalization CI
on:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
pull_request:
jobs:
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
tox-env: [py38, py39, py310, py311, docs, linters, package]
include:
- tox-env: py38
python-version: 3.8
- tox-env: py39
python-version: 3.9
- tox-env: py310
python-version: "3.10"
- tox-env: py311
python-version: "3.11"
- tox-env: docs
python-version: "3.10"
- tox-env: linters
python-version: "3.10"
- tox-env: package
python-version: "3.10"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox
run: python -m pip install --upgrade pip tox
- name: Run Tox
run: python -m tox -e ${{ matrix.tox-env }} --skip-missing-interpreters false --recreate
build:
runs-on: ubuntu-22.04
needs: test
if: "startsWith(github.ref, 'refs/tags')"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build
run: python -m pip install --user build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@main
with:
password: ${{ secrets.pypi_token }}