forked from nomoresat/DPITunnel-cli
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (47 loc) · 1.38 KB
/
build.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
name: Build
on:
release:
types: [created]
push:
pull_request:
types: [opened, edited]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
- arch: x86
- arch: armhf
- arch: aarch64
- arch: armv7
- arch: ppc64le
- arch: s390x
name: Build on ${{ matrix.arch }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Docker
run: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
- name: Build in Docker
run: |
docker run --workdir /github/workspace --rm --entrypoint "./.github/scripts/build.sh" -v "$(pwd)":"/github/workspace" multiarch/alpine:${{ matrix.arch }}-edge
- name: Upload Binary
if: github.event_name != 'release'
uses: actions/upload-artifact@v4
with:
name: dpitunnel-${{ matrix.arch }}
path: build/dpitunnel
- name: Upload Binary to Release
if: github.event_name == 'release'
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/dpitunnel
asset_name: dpitunnel-${{ matrix.arch }}
tag: ${{ github.ref }}