-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (46 loc) · 1.43 KB
/
distribute.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
name: Distribute to PyPI
on:
push:
tags:
- v*
jobs:
distribute:
runs-on: ubuntu-latest
outputs:
SDIST_VERSION: ${{ steps.build.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel "setuptools-scm[toml]"
- name: Build distribuion
id: build
run: |
git fetch origin +refs/tags/*:refs/tags/*
export SDIST_VERSION=$(python setup.py --version)
echo "::set-output name=version::${SDIST_VERSION}"
python setup.py sdist bdist_wheel
- name: upload to PyPI.org
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TOOLS_PYPI_PAK }}
verify-distribution:
runs-on: ubuntu-latest
needs: distribute
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
python-version: 3.6
activate-environment: hyp3-lib
environment-file: environment.yml
- name: Pip install ${{ needs.distribute.outputs.SDIST_VERSION }}
shell: bash -l {0}
run: |
python -m pip install hyp3lib==${{ needs.distribute.outputs.SDIST_VERSION }}