-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (114 loc) · 3.97 KB
/
Copy pathbuild-app.yml
File metadata and controls
138 lines (114 loc) · 3.97 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Build and Release ValidFlow
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build-backend:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Pipenv & Dependencies
working-directory: validflow-backend
run: |
pip install pipenv
pipenv install --deploy --ignore-pipfile
- name: Install missing macOS dependencies
if: runner.os == 'macOS'
working-directory: validflow-backend
run: pipenv install macholib
- name: Build Backend Binary
working-directory: validflow-backend
run: |
pipenv run python build-backend.py
- name: Upload Backend Artifact
uses: actions/upload-artifact@v4
with:
name: backend-${{ matrix.os }}
path: validflow-frontend/src-tauri/bin/start-*
build-and-release-app:
needs: build-backend
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Rust
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install required dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install visualstudio2022buildtools visualstudio2022-workload-vctools -y
rustup target add x86_64-pc-windows-msvc
- name: Install required dependencies on macOS
if: runner.os == 'macOS'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Install required dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Download Backend Binary
uses: actions/download-artifact@v4
with:
name: backend-${{ matrix.os }}
path: validflow-frontend/src-tauri/bin
- name: Make Backend Executable (non-Windows)
if: runner.os != 'Windows'
run: |
chmod +x validflow-frontend/src-tauri/bin/start-*
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install Frontend Dependencies
working-directory: validflow-frontend
run: npm install
- name: Build Frontend
working-directory: validflow-frontend
run: npm run build
- name: Build Tauri App
working-directory: validflow-frontend
run: npm run tauri build
- name: Upload Release Artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: |
validflow-frontend/src-tauri/target/release/bundle/**/*.msi
validflow-frontend/src-tauri/target/release/bundle/**/*.dmg
validflow-frontend/src-tauri/target/release/bundle/**/*.app
validflow-frontend/src-tauri/target/release/bundle/**/*.AppImage
validflow-frontend/src-tauri/target/release/bundle/**/*.deb
validflow-frontend/src-tauri/target/release/bundle/**/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}