This repository was archived by the owner on Jul 13, 2026. It is now read-only.
Repository navigation
75 lines (65 loc) · 2.15 KB
/
Copy pathrelease.yml
File metadata and controls
75 lines (65 loc) · 2.15 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
name: Release finitechat
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- runs_on: ubuntu-latest
asset_name: finitechat-linux-x86_64
target: x86_64-unknown-linux-gnu
- runs_on: macos-14
asset_name: finitechat-macos-aarch64
target: aarch64-apple-darwin
- runs_on: macos-14
asset_name: finitechat-macos-x86_64
target: x86_64-apple-darwin
runs-on: ${{ matrix.runs_on }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install 1.88.0 --profile minimal
rustup default 1.88.0
rustup target add "${{ matrix.target }}"
- name: Build finitechat
run: cargo build --locked --release --target "${{ matrix.target }}" --package finitechat-cli --bin finitechat
- name: Package finitechat
shell: bash
run: |
mkdir -p dist
cp "target/${{ matrix.target }}/release/finitechat" dist/finitechat
tar -C dist -czf "${{ matrix.asset_name }}.tar.gz" finitechat
shasum -a 256 "${{ matrix.asset_name }}.tar.gz" > "${{ matrix.asset_name }}.tar.gz.sha256"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: |
${{ matrix.asset_name }}.tar.gz
${{ matrix.asset_name }}.tar.gz.sha256
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release-assets
merge-multiple: true
- name: Create or update GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
tag="${GITHUB_REF_NAME}"
if gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release upload "$tag" release-assets/* --repo "$GITHUB_REPOSITORY" --clobber
else
gh release create "$tag" release-assets/* --repo "$GITHUB_REPOSITORY" --title "$tag" --generate-notes
fi