-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (49 loc) · 1.33 KB
/
build-linux.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
name: Build Linux packages
on:
workflow_dispatch:
push:
tags:
- '*'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: "linux/amd64"
name: "amd64"
- platform: "linux/arm64"
name: "aarch64"
- platform: "linux/arm/v7"
name: "armhf"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Compile
run: |
docker buildx build \
-f Dockerfile \
--platform ${{ matrix.platform }} \
-o ${{ github.workspace }}/build \
.
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: gcfflasher-${{ matrix.name }}
# path: build/src/*.deb
- name: Upload binaries to release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
release_name: ${{ github.ref_name }}
file: build/src/*_linux_*
tag: ${{ github.ref }}
overwrite: true
file_glob: true