-
Notifications
You must be signed in to change notification settings - Fork 40
48 lines (48 loc) · 1.68 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
name: Build
on:
release:
types: [published]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-11
TARGET: macos
CMD_BUILD: pyinstaller workbench --onefile --name workbench-macos
OUT_FILE_NAME: workbench-macos
ASSET_MIME: application/zip
- os: ubuntu-latest
TARGET: linux
CMD_BUILD: pyinstaller workbench --onefile --name workbench-linux
OUT_FILE_NAME: workbench-linux
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: pyinstaller workbench --onefile --name workbench
OUT_FILE_NAME: workbench.exe
ASSET_MIME: application/vnd.microsoft.portable-executable
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "pyinstaller" "requests>=2.22,<3" "requests_cache" "ruamel.yaml<=0.17.21" "progress_bar" "openpyxl" "unidecode" "edtf_validate" "typing-extensions" "rich"
- name: Build for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/${{ matrix.OUT_FILE_NAME}}
asset_name: ${{ matrix.OUT_FILE_NAME}}
asset_content_type: ${{ matrix.ASSET_MIME}}