Alpine-appimage #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | |
libc6-compat | |
- name: Build code | |
run: 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 |