forked from WeberSynBioLab/optoConfig-96
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (83 loc) · 2.49 KB
/
build.yaml
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
name: build
on:
push:
tags:
- "v*"
- "!v*post*" # Do not build on post-releases (pypi only)
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check guide is up to date
run: |
# This will fail if version numbers do not match
make check_version_number
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install package
run: |
python -m pip install --upgrade pip wheel build
- name: Build package
run: |
python -m build
# Make a directory that matches the dist* glob in upload-artifact
# in order to upload the built package in a subdirectory.
mkdir dist_stub
- uses: actions/upload-artifact@v3
with:
name: build-archives
path: dist*
build-win:
runs-on: windows-latest
# First check if doc versions match
needs: [build-linux]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install package
run: |
python -m pip install --upgrade pip wheel
python -m pip install ".[build]"
- name: Build package
run: |
pyinstaller optoConfig96.spec
- name: Compress package
run: 7z a -tzip windows.zip ./dist/*
- uses: actions/upload-artifact@v3
with:
name: build-archives
path: windows.zip
build-macos:
runs-on: macos-11
# First check if doc versions match
needs: [build-linux]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install package and dependencies
run: |
brew install create-dmg
python -m pip install --upgrade pip wheel
python -m pip install ".[build]"
- name: Build package
run: |
pyinstaller optoConfig96.spec
chmod +x create_dmg.sh
# Sign after removal of offending packages (see optoConfig96.spec)
codesign -s - --force --all-architectures --timestamp --deep dist/optoConfig96.app
./create_dmg.sh
- uses: actions/upload-artifact@v3
with:
name: build-archives
path: darwin.dmg
release:
needs: [build-win, build-macos, build-linux]
permissions:
contents: write
uses: ./.github/workflows/release.yaml