-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.42 KB
/
build-release.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
name: Build Release
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- .github/workflows/*
jobs:
publish:
runs-on: ubuntu-latest
env:
python_ver: 3.10
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'plugin.json'
prop_path: 'Version'
- run: echo ${{steps.version.outputs.prop}}
- name: Install libraries and dependencies
run: |
# Update pip
python -m pip install --upgrade pip
# Purge pip cache for clean platform change
pip cache purge
# Install requirements with windows platform dependency
pip install -r requirements.txt \
--platform win_amd64 \
--target ./lib \
--only-binary=:all:
# Zip localized libraries and dependencies
zip -r Flow.Launcher.Plugin.Ollama.zip . -x '*.git*'
- name: Publish
if: success()
uses: softprops/action-gh-release@v2
with:
files: 'Flow.Launcher.Plugin.Ollama.zip'
tag_name: "v${{steps.version.outputs.prop}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}