forked from sfu-db/dataprep
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (91 loc) · 3.23 KB
/
release.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: release
on:
push:
branches:
- release
jobs:
# docs-build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# pip install poetry
# curl -L https://github.com/jgm/pandoc/releases/download/2.11.2/pandoc-2.11.2-1-amd64.deb -o /tmp/pandoc.deb && sudo dpkg -i /tmp/pandoc.deb
# - name: Cache venv
# uses: actions/cache@v2
# with:
# path: ~/.cache/pypoetry/virtualenvs
# key: ${{ runner.os }}-build-${{ matrix.python }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('poetry.lock') }}
# - name: Install dependencies
# run: |
# pip install poetry
# poetry install
# - name: Build docs
# run: poetry run sphinx-build -M html docs/source docs/build
# - name: Archive docs
# uses: actions/upload-artifact@v2
# with:
# name: docs
# path: docs/build/html
build:
runs-on: ubuntu-latest
# needs: docs-build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Cache venv
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
echo "Cache Version ${{ secrets.CACHE_VERSION }}"
pip install poetry toml-cli
poetry install
poetry config --list
- name: Print tool versions
run: |
poetry run pylint --version
poetry run pytest --version
poetry run black --version
poetry run pyright --version
- name: Build wheels
run: poetry build
- name: Parse version from pyproject.toml
run: echo "DATAPREP_VERSION=`toml get --toml-path pyproject.toml tool.poetry.version`" >> $GITHUB_ENV
- name: Create release note
run: poetry run python scripts/release-note.py $(git rev-parse --short HEAD) > RELEASE.md
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.whl,dist/*.tar.gz"
bodyFile: "RELEASE.md"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
tag: v${{ env.DATAPREP_VERSION }}
commit: ${{ env.GITHUB_SHA }}
- name: Upload wheels
run: poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
# docs-deploy:
# runs-on: ubuntu-latest
# needs: build
# if: ${{ github.event.ref == 'refs/heads/release' }}
# steps:
# - uses: actions/checkout@v2
# - name: Download docs
# uses: actions/download-artifact@v2
# with:
# name: docs
# path: docs/build/html
# - run: echo 'docs.dataprep.ai' > docs/build/html/CNAME
# - name: Deploy 🚀
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: docs/build/html # The folder the action should deploy.
# clean-exclude: dev