-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 2.08 KB
/
build-release.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
name: Build Release
# This workflow is triggered manually
on: workflow_dispatch
jobs:
build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
#- macos-latest # Not supported yet
python-version:
- 3.10.5
include:
- os: ubuntu-latest
release-name: Linux
- os: windows-latest
release-name: Windows
#- os: macos-latest
# release-name: MacOS
# Use bash shell for all steps
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches, required for versioning
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Linux only dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y libopenblas-dev liblapack-dev
- name: Install dependencies
run: pip install -r requirements.txt --verbose
- name: Build release
run: python setup.py build --build-exe=./build
- name: Get latest release tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
# name example: "PhantomDesktop-Windows-v1.0.0.zip", "PhantomDesktop-Linux-v2.5.1.zip"
- name: Set release name
id: release-name
run: echo "name=PhantomDesktop-${{ matrix.release-name }}-${{ steps.previoustag.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Archive Release
uses: thedoctor0/zip-release@main # works on Windows, Linux, MacOS. This is required to preserve chmod +x on Linux
with:
path: ./build
filename: ${{ steps.release-name.outputs.name }}.zip
- name: Upload release
uses: actions/upload-artifact@v2
with:
name: ${{ steps.release-name.outputs.name }}
path: ${{ steps.release-name.outputs.name }}.zip