-
-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (56 loc) · 2.13 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release
on:
push:
tags:
- "**"
jobs:
build:
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo dpkg --add-architecture arm64
RELEASE="$(lsb_release --codename --short)"
sudo sed -i -r "s/^(deb|deb-src) /\1 [arch=amd64] /g" /etc/apt/sources.list
sudo tee /etc/apt/sources.list.d/arm64.list << EOF > /dev/null
deb [arch=arm64] http://ports.ubuntu.com/ $RELEASE main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ $RELEASE-updates main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ $RELEASE-backports main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ $RELEASE-security main restricted universe multiverse
EOF
sudo apt-get update
sudo apt-get install \
gcc-aarch64-linux-gnu \
libfreetype6-dev:arm64 \
libfontconfig1-dev:arm64
cat >> "$GITHUB_ENV" << EOF
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
PKG_CONFIG=aarch64-linux-gnu-pkg-config
EOF
- run: cargo fetch --locked --target ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }}
- run: |
mkdir ./release
cp ./target/${{ matrix.target }}/release/figma-agent \
./release/figma-agent-${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.target }}
path: ./release/figma-agent-${{ matrix.target }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: release-*
path: ./release
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
name: Figma Agent for Linux ${{ github.ref_name }}
files: ./release/figma-agent-*