-
Notifications
You must be signed in to change notification settings - Fork 212
89 lines (76 loc) · 3.06 KB
/
release.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
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
name: Release
on:
push:
tags:
- '*'
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.s6_arch }}
steps:
- uses: actions/checkout@v3
- id: matrix
run: |
echo s6_arch=$(cut -f1 conf/toolchains | sed -z '$ s/\n$//' | jq -R -s -c 'split("\n")') >> "$GITHUB_OUTPUT"
- run: |
. conf/versions
printf "Binary releases include the following packages:\n\n" > release-notes.md
printf "| Software | Version |\n" >> release-notes.md
printf "| -------- |:-------:|\n" >> release-notes.md
printf "| BearSSL | %s \n" "${BEARSSL_VERSION}" >> release-notes.md
printf "| skalibs | %s \n" "${SKALIBS_VERSION}" >> release-notes.md
printf "| execline | %s \n" "${EXECLINE_VERSION}" >> release-notes.md
printf "| s6 | %s \n" "${S6_VERSION}" >> release-notes.md
printf "| s6-rc | %s \n" "${S6_RC_VERSION}" >> release-notes.md
printf "| s6-linux-init | %s \n" "${S6_LINUX_INIT_VERSION}" >> release-notes.md
printf "| s6-portable-utils | %s \n" "${S6_PORTABLE_UTILS_VERSION}" >> release-notes.md
printf "| s6-linux-utils | %s \n" "${S6_LINUX_UTILS_VERSION}" >> release-notes.md
printf "| s6-dns | %s \n" "${S6_DNS_VERSION}" >> release-notes.md
printf "| s6-networking | %s \n" "${S6_NETWORKING_VERSION}" >> release-notes.md
printf "| s6-overlay-helpers | %s \n" "${S6_OVERLAY_HELPERS_VERSION}" >> release-notes.md
printf "\n" >> release-notes.md
- uses: ncipollo/release-action@v1
with:
omitBodyDuringUpdate: true
allowUpdates: true
bodyFile: release-notes.md
release:
needs: [ setup ]
runs-on: ubuntu-latest
strategy:
matrix:
s6_arch: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
# normalize version (remove 'git/refs/', remove leading 'v')
- run: |
VERSION="${GITHUB_REF##*/}"
VERSION="${VERSION#v}"
echo "S6_VERSION=${VERSION}" >> $GITHUB_ENV
# create short arch name
- run: |
HW=$(echo "${{ matrix.s6_arch }}" | cut -f1 -d'-')
if [ "${{matrix.s6_arch}}" = "arm-linux-musleabihf" ] ; then
HW="armhf"
fi
echo "S6_HW=${HW}" >> $GITHUB_ENV
- run: |
make ARCH="${{ matrix.s6_arch }}" VERSION="${{ env.S6_VERSION }}"
- run: |
cd output ; for f in *.tar* ; do sha256sum "$f" > "$f".sha256 ; done
# output arch-specific binary
- uses: ncipollo/release-action@v1
with:
artifacts: "output/s6-overlay-${{ env.S6_HW }}*"
omitBodyDuringUpdate: true
allowUpdates: true
- run: |
rm -v output/s6-overlay-${{ env.S6_HW }}*
# upload symlinks/non-arch on x86_64 only
- uses: ncipollo/release-action@v1
with:
artifacts: "output/*.tar.*"
omitBodyDuringUpdate: true
allowUpdates: true
if: ${{ matrix.s6_arch == 'x86_64-linux-musl' }}