-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.3 KB
/
ci.yml
File metadata and controls
55 lines (47 loc) · 1.3 KB
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: CI
on:
push:
branches: [master]
tags: ['v*']
pull_request:
branches: [master]
jobs:
# ---- Build test ----
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgeos-dev python3-pip
python3 -m pip install shapely
- name: Configure and build .deb
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make deb
# ---- Release: build .deb and publish on tag -------------------------------
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgeos-dev python3-pip
python3 -m pip install shapely
- name: Build .deb
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make deb
- name: Publish release
uses: softprops/action-gh-release@v2
with:
files: build/shapelycpp-dev-*.deb
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}