-
Notifications
You must be signed in to change notification settings - Fork 59
48 lines (45 loc) · 1.42 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
name: publish PyPI and TestPyPI
on:
push:
branches:
- master
- rc
jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.10", ]
steps:
- uses: actions/checkout@v2
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
python-version: ${{ matrix.python-version }}
- name: Make sdist
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
conda install --yes "libblas=*=*openblas" openblas cmake c-compiler numpy
./get_nanoversion.sh
cat __nanoversion__.txt
python setup.py sdist
- name: Publish package to TestPyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/rc')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/master')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}