This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (83 loc) · 2.46 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
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "dev" ]
defaults:
run:
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build
run: |
bash semver.sh
pyinstaller -y decoder.spec
- name: Linux rename
if: runner.os == 'Linux'
run: mv dist/GeoscanDecoder dist/GeoscanDecoder_linux
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: GeoscanDecoder_${{ matrix.os }}
path: dist/*
build7:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build
run: |
bash semver.sh
pyinstaller -y decoder.spec
mv dist/GeoscanDecoder.exe dist/GeoscanDecoder_win7.exe
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: GeoscanDecoder_win7
path: dist/*
nightly_release:
runs-on: ubuntu-latest
needs: ["build", "build7"]
steps:
- uses: actions/download-artifact@v3
- name: Collect
run: |
mkdir out &&
cp GeoscanDecoder_*/* out/
- name: Cleanup
continue-on-error: true
run: gh release delete nightly -R ${{ github.repository }} --cleanup-tag -y
- name: Create nightly release
run: gh release create nightly -R ${{ github.repository }} -t nightly --target dev --generate-notes --prerelease out/*