This repository was archived by the owner on Mar 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
114 lines (94 loc) · 2.85 KB
/
release.yml
File metadata and controls
114 lines (94 loc) · 2.85 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
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Build frontend
run: make build-frontend
- name: Run all tests
run: make test-all
build-and-release:
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux builds (static with musl)
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: flow
asset_name: flow-linux-amd64
# macOS builds
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: flow
asset_name: flow-darwin-amd64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: flow
asset_name: flow-darwin-arm64
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Install musl tools
if: contains(matrix.target, 'musl')
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Build frontend
run: make build-frontend
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: Strip binary
run: strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- name: Create archive
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
cd ../../..
- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset_name }}.tar.gz
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}