Skip to content

Alpine-appimage

Alpine-appimage #12

name: Alpine-appimage
on:
release:
types: [created] # Triggers on release created
workflow_dispatch:
jobs:
build-and-create-appimage:
runs-on: ubuntu-latest
container:
image: alpine:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install build essentials and dependencies
run: |
apk update
apk add --no-cache \
build-base \
ffmpeg-dev \
fftw-dev \
freeimage-dev \
chafa-dev \
opus-dev \
opusfile-dev \
libvorbis-dev \
libnotify-dev \
glib-dev \
wget git desktop-file-utils \
squashfs-tools \
patchelf \
musl \
musl-dev \
gcompat
- name: Build code
run: |
CC=musl-gcc LDFLAGS=-static make
- name: Prepare AppDir
run: |
mkdir -p appdir/usr/bin
mv ./kew appdir/usr/bin/
- name: Download uploadtool
run: |
wget -q https://github.com/probonopd/uploadtool/raw/master/upload.sh
chmod +x upload.sh
mv upload.sh /usr/local/bin/uploadtool
- name: Download runtime-x86_64
run: |
wget -O appdir/runtime https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64
chmod +x appdir/runtime
- name: Download and prepare appimagetool
run: |
wget -O appimagetool-x86_64.AppImage -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-x86_64.AppImage
- name: Extract appimagetool
run: |
./appimagetool-x86_64.AppImage --appimage-extract
mv squashfs-root/usr/bin/appimagetool ./appimagetool
- name: Deploy desktop file
run: |
./appimagetool deploy appdir/usr/share/applications/kew.desktop
- name: Remove unnecessary libraries
run: |
rm appdir/usr/lib/libavcodec*
rm appdir/usr/lib/libavformat*
rm appdir/usr/lib/libavutil*
rm appdir/usr/lib/libswres*
- name: Create AppImage
run: |
./appimagetool ./appdir
- name: Rename AppImage and move to output dir
run: |
mkdir -p musl
mv *.AppImage musl/kew
- name: Upload AppImage artifact
uses: actions/upload-artifact@v3
with:
name: kew-appimage-musl
path: musl/kew