-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (61 loc) · 1.93 KB
/
distribute.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
name: Distribute Version
on:
workflow_dispatch:
inputs:
publishReleases:
description: 'Publish to Releases'
required: false
default: 'true'
#--macos-universal2
jobs:
distribute:
runs-on: ${{ matrix.os.host }}
strategy:
fail-fast: false
matrix:
os:
- name: windows
host: windows-latest
args:
- name: macos
host: macos-14
args:
- name: macos
host: macos-12
args:
# - name: ubuntu
# host: ubuntu-latest
# args:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Get Library Version
id: get_version
run: |
echo "Library Version: $(python setup.py --version)"
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
echo "v_version=v$(python setup.py --version)" >> $GITHUB_OUTPUT
shell: bash
- name: Build on ${{ matrix.os.name }}
run: |
echo "V-Version: ${{ steps.get_version.outputs.v_version }}"
pip install wheel
pip install -r requirements.txt
pip install -r dev-requirements.txt
python setup.py distribute --zip ${{ matrix.os.args }}
shell: bash
# upload dist
- name: Upload binaries to release
if: ${{ github.event.inputs.publishReleases == 'true' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ steps.get_version.outputs.v_version }}
release_name: "Version ${{ steps.get_version.outputs.version }}"
body: "Prebuilt wheel packages version ${{ steps.get_version.outputs.version }}."
overwrite: true
file_glob: true