Skip to content

Commit 5352d95

Browse files
committed
ci: static job
Signed-off-by: CrazyMax <[email protected]>
1 parent 1826129 commit 5352d95

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
pull_request:
1212

1313
jobs:
14-
build:
14+
pkg:
1515
runs-on: ubuntu-20.04
1616
strategy:
1717
fail-fast: false
@@ -29,3 +29,45 @@ jobs:
2929
name: Build
3030
run: |
3131
make ${{ matrix.target }}
32+
33+
static:
34+
runs-on: ubuntu-20.04
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
platform:
39+
- linux/amd64
40+
- linux/arm/v6
41+
- linux/arm/v7
42+
- linux/arm64
43+
- darwin/amd64
44+
- darwin/arm64
45+
- windows/amd64
46+
steps:
47+
-
48+
name: Prepare
49+
run: |
50+
platform=${{ matrix.platform }}
51+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
52+
-
53+
name: Checkout
54+
uses: actions/checkout@v3
55+
-
56+
name: Set up Docker Buildx
57+
uses: docker/setup-buildx-action@v2
58+
-
59+
name: Build
60+
run: |
61+
make TARGETPLATFORM=${{ matrix.platform }} static
62+
-
63+
name: List files
64+
run: |
65+
tree -nh ./static/build
66+
-
67+
name: Upload static bundle
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: static-${{ env.PLATFORM_PAIR }}
71+
path: static/build/*.tar.gz
72+
if-no-files-found: error
73+
retention-days: 2

0 commit comments

Comments
 (0)