Build and Package - Linux #6
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: Build and Package - Linux | |
# on: [push, pull_request, workflow_dispatch] | |
on: [workflow_dispatch] | |
jobs: | |
build-hnsd: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout hnsd repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'handshake-org/hnsd' | |
ref: master | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install -y libunbound-dev | |
- name: Build hnsd | |
run: | | |
./autogen.sh && ./configure && make | |
ls -l | |
- name: Store hnsd binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hnsd-bin | |
path: ./hnsd | |
if-no-files-found: error | |
build-fingertip: | |
needs: build-hnsd | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Install dependencies | |
run: sudo apt install -y libgtk-3-dev libappindicator3-dev libgetdns-dev | |
- name: Build fingertip | |
run: | | |
go build -trimpath -o ./builds/linux/appdir/usr/bin | |
ls -l builds/linux/appdir/usr/bin/ | |
- name: Download hnsd binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: hnsd-bin | |
path: builds/linux/appdir/usr/bin | |
- name: Package as AppImage | |
working-directory: ./builds/linux | |
run: | | |
ls -l appdir/usr/bin/ | |
chmod +x appdir/usr/bin/hnsd | |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/fingertip.desktop -appimage | |
- name: Store fingertip binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fingertip-bin | |
path: ./builds/linux/appdir/usr/bin/fingertip | |
if-no-files-found: error | |
- name: Store fingertip appimage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fingertip-appimage | |
path: ./builds/linux/Fingertip*.AppImage | |
if-no-files-found: error |