-
-
Notifications
You must be signed in to change notification settings - Fork 53
39 lines (35 loc) · 1.16 KB
/
build-arm64.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
name: Build for ARMv8 (64-bit)
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set env
run: if grep -Fxq "devel" cmd/go2tv/version.txt;then echo "GO2TV_VERSION=$(cat cmd/go2tv/version.txt)";else echo "GO2TV_VERSION=v$(cat cmd/go2tv/version.txt)";fi >> $GITHUB_ENV
- uses: pguyot/arm-runner-action@v2
id: main_image
with:
copy_repository_path: /go2tv_dir
copy_artifact_path: go2tv
image_additional_mb: 800
base_image: raspios_lite_arm64:latest
commands: |
cd /
sudo apt update
sudo apt install -y xorg-dev
sudo apt clean
wget -nv https://go.dev/dl/go1.23.4.linux-arm64.tar.gz
tar -xzf go1.23.4.linux-arm64.tar.gz
rm go1.23.4.linux-arm64.tar.gz
export GOROOT=/go
cd /go2tv_dir
/go/bin/go build -ldflags "-s -w" -o go2tv cmd/go2tv/go2tv.go
- uses: actions/upload-artifact@v4
with:
name: go2tv_${{ env.GO2TV_VERSION }}_linux_arm64
path: |
LICENSE
README.md
go2tv
retention-days: 2