-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (60 loc) · 1.92 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
name: Processing Release
run-name: Build Processing
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- run: sudo apt-get update
- run: python -m pip install --upgrade pip
- run: pip install black --upgrade
- name: Install dependencies
run: |
pip install pex==2.1.90
pip install -r requirements.txt
- name: Run tests
run: |
pip install pytest
pytest -s
pex-build:
name: Build distribution 📦
runs-on: ubuntu-latest
needs:
- tests
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Install dependencies
run: |
pip install pex==2.1.90
pip install -r requirements.txt
- name: Install NFPM
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt install nfpm
- name: Build deb
run: _release/build ${{ github.ref_name }}
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: 'build/*.deb'
allowUpdates: true