-
Notifications
You must be signed in to change notification settings - Fork 4.3k
81 lines (71 loc) · 1.94 KB
/
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build and Release
on:
push:
branches:
- ft-binary
jobs:
# test-examples:
# if: ${{ !inputs.skip_tests }}
# uses: ./.github/workflows/examples.yml
# with:
# working-directory: ./python
# secrets: inherit
publish-core:
name: Create Framework & Plugin Releases
# needs: test-examples
defaults:
run:
working-directory: ./python
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
python -m pip install --upgrade pip
pip install twine build
# Build dist
python -m build
publish-cli:
name: Build and upload CLI
needs: publish-core
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build for ${{ matrix.os }}
run: |
python -m pip install --upgrade pip
pip install pyinstaller
cd python/
pip3 install .
# Build CLI
pyinstaller --onefile composio/cli/__main__.py
# Mac ARM Release
- if: matrix.os == 'macos-14'
run: |
cd python/
zip -r composio-darwin-arm64.zip dist/*
rm -rf dist/
- if: matrix.os == 'macos-14'
name: Upload artifact to GitHub
uses: actions/upload-artifact@v2
with:
name: composio-darwin-arm64
path: python/composio-darwin-arm64.zip