-
Notifications
You must be signed in to change notification settings - Fork 20
52 lines (50 loc) · 1.63 KB
/
draft-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
name: Create Draft Release on Version Update
on:
push:
branches: [ main ]
paths:
- 'VERSION'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.7
- name: Install dependencies
run: |
python3.7 -m pip install --upgrade pip
python3.7 -m pip install setuptools wheel twine
python3.7 -m pip install virtualenv pip-tools
sudo add-apt-repository -y ppa:ubuntugis/ppa \
&& sudo apt install -y \
gdal-bin libgdal-dev
mv ./.depends/requirements.txt requirements.in
touch requirements.txt
echo "" >> requirements.in
cat requirements.linked.in >> requirements.in
pip-compile -v requirements.in
cd .depends
requirements=$(find . -type f -name "*.requirements*" | paste -sd " ")
for req in $requirements
do
echo "Solving for Requirements : $req"
mv $req temp.in
echo "-c ../requirements.txt" >> temp.in
touch $req
pip-compile temp.in -o $req
done
cd ..
mv requirements.txt ./.depends/requirements.txt
python setup.py sdist bdist_wheel
- name: Get version from ref
id: get-version
run: echo ::set-output name=VERSION::$(cat VERSION)
- uses: ncipollo/release-action@v1
with:
artifacts: "*.tar.gz,*.whl"
bodyFile: "body.md"
token: ${{ secrets.GITHUB_TOKEN }}