summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMasanori Ogino <masanori.ogino@gmail.com>2022-05-31 15:35:02 +0900
committerMasanori Ogino <masanori.ogino@gmail.com>2022-05-31 17:13:11 +0900
commit1d439f0ab811cf37c5adaee263616f4b13dde9a4 (patch)
treeb9887948c7a3ead03db69633d9d64a36735530e7 /.github
parentac6f928ad4f47360eb90f2b0b8d098c6e70cce1b (diff)
Add a workflow to upload Linux build on releases
Building static binaries with Alpine Linux's musl libc-based toolchain should make them work on any distros with Linux kernel 2.6.39 and newer. Fixes https://github.com/mawww/kakoune/issues/4555 References: - https://wiki.musl-libc.org/supported-platforms.html Signed-off-by: Masanori Ogino <masanori.ogino@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-releases-linux.yaml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/build-releases-linux.yaml b/.github/workflows/build-releases-linux.yaml
new file mode 100644
index 00000000..9271133a
--- /dev/null
+++ b/.github/workflows/build-releases-linux.yaml
@@ -0,0 +1,29 @@
+name: Build static binaries for Linux
+
+on:
+ release:
+ types: [published, edited]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: alpine:latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.release.tag_name }}
+ - name: Prepare
+ run: apk add --no-cache binutils bzip2 g++ git make tar
+ - name: Build
+ run: |
+ mkdir -p kakoune-${{ github.event.release.tag_name }}-linux/
+ make -C src all static=yes
+ make -C src install PREFIX=$(pwd)/kakoune-${{ github.event.release.tag_name }}-linux/
+ strip -s kakoune-${{ github.event.release.tag_name }}-linux/bin/kak
+ tar cvjf kakoune-${{ github.event.release.tag_name }}-linux.tar.bz2 kakoune-${{ github.event.release.tag_name }}-linux/
+ - name: Upload
+ uses: softprops/action-gh-release@v1
+ with:
+ files: kakoune-${{ github.event.release.tag_name }}-linux.tar.bz2