forked from PhilaController/esri2gpd
77 lines (73 loc) · 2.17 KB
/
deploy.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
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Upload
on:
push:
tags:
- "*"
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
poetry-version: ["1.1.11"]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run py.test . --cov
- name: Upload coverage
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-pypi:
needs: test
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: "1.1.11"
- name: Upload to PyPI
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
upload-conda:
needs: test
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2.3.3
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Setup Anaconda Client
run: conda install --yes conda-build poetry
- name: Set latest version
run: echo "version=${{ steps.previoustag.outputs.tag }}" >> $GITHUB_ENV
- name: Conda build
env:
PYTHON_VERSIONS: "[3.8]"
LATEST_VERSION: ${{ env.version }}
run: bash conda-build.sh
- name: Upload to Anaconda
shell: bash -l {0}
run: |
conda install --yes anaconda-client
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --skip-existing conda-bld/**/esri2gpd-*.tar.bz2