-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (40 loc) · 1.32 KB
/
pybackend_libs_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
name: release
on:
push:
# Sequence of patterns matched against refs/tags
branches:
- "r*"
env:
PY_NEXUS: http://110.16.193.170:50083/repository/pypi-hosted/
DOCKER_NEXUS: 110.16.193.170:50080
# PY_NEXUS: https://nx.dataelem.com/repository/pypi-hosted/
# DOCKER_NEXUS: cr.dataelem.com
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
#if: startsWith(github.event.ref, 'refs/tags')
steps:
- name: checkout
uses: actions/checkout@v2
# Build bisheng-pybackend-libs
- name: Set python version 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build PyPi bisheng-pybackend-libs and push
id: pypi_build_bisheng_pybackend_libs
run: |
pip install Cython
pip install wheel
pip install twine
cd python/pybackend_libs
tag=${{ github.ref_name }}
echo ${tag:1} > ./version.txt
python setup.py bdist_wheel
twine upload dist/* -u ${{ secrets.NEXUS_USER }} -p ${{ secrets.NEXUS_PASSWORD }} --repository-url ${{ env.PY_NEXUS }}
set +e
twine upload dist/* -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} --repository pypi
set -e