Repository navigation
76 lines (64 loc) · 2.06 KB
/
Copy pathbuild-linux-binary.yml
File metadata and controls
76 lines (64 loc) · 2.06 KB
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
name: Build Linux binary
permissions:
contents: write
actions: read
env:
PYAPP_DOWNLOAD: https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz
on:
workflow_dispatch: {}
workflow_call:
push:
tags:
- '*'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.11'
- name: Install uv and build tooling
run: |
python -m pip install --upgrade pip
pip install uv build
- name: Determine App Version
run: |
python .github/scripts/get_version.py
- name: Setup PyAPP and build
env:
PYAPP_UV_ENABLED: 1
PYAPP_PYTHON_VERSION: '3.11'
PYAPP_FULL_ISOLATION: 1
PYAPP_PROJECT_NAME: fm
PYAPP_EXEC_SPEC: frappe_manager.main:cli_entrypoint
PYAPP_PIP_EXTRA_ARGS: typer[all] requests psutil ruamel-yaml tomlkit certbot pydantic email-validator jinja2 certbot-dns-cloudflare ngrok passlib
PYAPP_DISTRIBUTION_EMBED: 1
run: |
python -m build
curl ${PYAPP_DOWNLOAD} -Lo pyapp-source.tar.gz
tar -xzf pyapp-source.tar.gz
mv pyapp-v* pyapp-latest
cd pyapp-latest
cargo build --release
mv target/release/pyapp ../fm && chmod +x ../fm
- name: Upload Artifact
uses: actions/upload-artifact@v7
with:
name: frappe_manager-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64
path: |
fm
LICENSE
README.md
retention-days: 5
- name: Create release zip
if: ${{ github.event.release && github.event.action == 'published' }}
run: zip frappe_manager-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64.zip "frappe_manager" "LICENSE" "README.md"
- name: Attach files to release
uses: softprops/action-gh-release@v3
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: frappe_manager-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64.zip