-
Notifications
You must be signed in to change notification settings - Fork 33
75 lines (74 loc) · 2.61 KB
/
streamdeck-plugin-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
name: "Build and bundle the Stream Deck plugin"
on:
workflow_dispatch:
push:
paths:
- streamdeck-plugin/**
- com.chrisregado.googlemeet.sdPlugin/**
jobs:
build-plugin:
strategy:
matrix:
include:
- os: macos
runs_on: macos-latest
- os: windows
runs_on: windows-2019
name: Build ${{ matrix.os }} Stream Deck Plugin
runs-on: ${{ matrix.runs_on }}
defaults:
run:
shell: bash
working-directory: streamdeck-plugin
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Set up Pip
run: python -m pip install --upgrade pip
- name: pip install
run: pip install -r requirements.txt
- name: Run unit tests
run: python -m unittest
- name: Bundle plugin
run: pyinstaller --clean --dist ../com.chrisregado.googlemeet.sdPlugin/dist/${{ matrix.os }} src/main.py && rm -rf build
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-plugin-intermediate-build
path: ${{ github.workspace }}/com.chrisregado.googlemeet.sdPlugin/dist/${{ matrix.os }}
bundle-streamdeck-distributable:
name: Bundle multi-OS Stream Deck plugin distributable binary
runs-on: macos-latest
needs: [build-plugin]
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Download DistributionTool
run: curl -L https://github.com/ChrisRegado/streamdeck-build-tools/raw/master/DistributionToolMac/DistributionTool -o DistributionTool
- name: Make DistributionTool Executable
run: chmod +x DistributionTool
- name: Download macOS plugin artifact
uses: actions/download-artifact@v3
with:
name: macos-plugin-intermediate-build
path: com.chrisregado.googlemeet.sdPlugin/dist/macos
- name: Download Windows plugin artifact
uses: actions/download-artifact@v3
with:
name: windows-plugin-intermediate-build
path: com.chrisregado.googlemeet.sdPlugin/dist/windows
- name: Make output dir
run: mkdir output
- name: Bundle plugin
run: ./DistributionTool -b -i ./com.chrisregado.googlemeet.sdPlugin -o output/
- name: Upload final plugin binary
uses: actions/upload-artifact@v1
with:
name: com.chrisregado.googlemeet.streamDeckPlugin
path: output/com.chrisregado.googlemeet.streamDeckPlugin