forked from indico/indico
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 1.59 KB
/
build.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
name: Build
on:
push:
branches:
- 'master'
- '*.x'
- '!1.*'
- '!2.*'
- '!3.0.*'
- '!3.1.*'
pull_request:
branches:
- 'master'
- '*.x'
- '!1.*'
- '!2.*'
- '!3.0.*'
- '!3.1.*'
types:
- opened
- reopened
- synchronize
- labeled
jobs:
build:
name: Build package 📦
runs-on: ubuntu-22.04
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'build-wheel')
steps:
- uses: actions/checkout@v4
with:
# prefer head commit over merge commit in case of PRs
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
- uses: actions/setup-python@v4
name: Set up Python 🐍
with:
python-version: '3.11'
cache: pip
cache-dependency-path: |
requirements.txt
requirements.dev.txt
- uses: actions/setup-node@v4
name: Setup Node
with:
node-version: 18.x
- name: Install build deps 🔧
run: |
sudo apt-get install libpq-dev
pip install --user -U pip setuptools wheel
pip install --user -e '.[dev]'
- name: Install npm deps ☕
run: npm ci
- name: Build wheel 🏗
run: ./bin/maintenance/build-wheel.py indico --add-version-suffix
- uses: actions/upload-artifact@v3
name: Upload build artifacts 📦
with:
name: indico-wheel
retention-days: 7
path: ./dist