-
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (104 loc) · 3.62 KB
/
Copy pathrelease.yml
File metadata and controls
106 lines (104 loc) · 3.62 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Release static binaries
on:
push:
branches: [master]
paths:
- release/**
- .github/workflows/release.yml
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
# musl: fully static, run-anywhere Linux binaries. Not just the
# 6 platforms the multi-arch Docker image covers -- zig can
# cross-compile for anything it has an LLVM backend and libc
# for, no QEMU or buildx platform required, so this reaches
# architectures Docker has no platform for at all.
- x86_64-linux-musl
- aarch64-linux-musl
- aarch64_be-linux-musl
- arm-linux-musleabi
- arm-linux-musleabihf
- x86-linux-musl
- riscv32-linux-musl
- riscv64-linux-musl
- mips-linux-musleabi
- mipsel-linux-musleabi
- mips64-linux-muslabi64
- mips64el-linux-muslabi64
- mips64-linux-muslabin32
- mips64el-linux-muslabin32
- powerpc-linux-musleabihf
- powerpc64-linux-musl
- powerpc64le-linux-musl
- s390x-linux-musl
- loongarch64-linux-musl
- hexagon-linux-musl
# Where Docker doesn't work at all: no Linux container can run
# a FreeBSD/NetBSD/OpenBSD/Windows/macOS binary. Native,
# dynamically linked against each OS's own libc (musl-style
# full static linking isn't available outside Linux) --
# Windows is the exception, mingw supports it.
- x86_64-freebsd-none
- aarch64-freebsd-none
- riscv64-freebsd-none
- aarch64-netbsd-none
- x86_64-openbsd-none
- x86_64-macos-none
- aarch64-macos-none
- x86_64-windows-gnu
- aarch64-windows-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Build
run: |
docker buildx build -f release/Dockerfile \
--build-arg TARGET=${{ matrix.target }} \
--output type=local,dest=release/dist .
- name: Package
run: |
cd release/dist
case "${{ matrix.target }}" in
*-windows-gnu)
mv bb bb.exe
zip -q "../../bb-${{ matrix.target }}.zip" bb.exe
;;
*)
chmod +x bb
tar -czf "../../bb-${{ matrix.target }}.tar.gz" bb
;;
esac
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bb-${{ matrix.target }}
path: bb-${{ matrix.target }}.*
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: '0'
- name: Semver run
id: semver
uses: lukaszraczylo/semver-generator@6ba4a2674f1534199785f77419cb2b82c42c0512 # v1.17.20
with:
config_file: .github/semver.yaml
repository_local: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
pattern: bb-*
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ steps.semver.outputs.semantic_version }}
files: dist/*/bb-*
generate_release_notes: true