diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c69057..033b653 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,23 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + build-ubuntu2404-image: + name: Build Docker Image for building Ezra Bible App on Ubuntu 24.04 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + name: Check out + + - uses: mr-smithers-excellent/docker-build-push@v3 + name: Build & push Docker image + with: + dockerfile: docker/Ubuntu2404_Dockerfile + image: toklein/ezra-ubuntu-2404 + tag: latest + registry: docker.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + build-mint21-image: name: Build Docker Image for building Ezra Bible App on Mint 21 runs-on: ubuntu-latest diff --git a/docker/Ubuntu2404_Dockerfile b/docker/Ubuntu2404_Dockerfile new file mode 100644 index 0000000..e5f99b4 --- /dev/null +++ b/docker/Ubuntu2404_Dockerfile @@ -0,0 +1,33 @@ +# Dockerfile for Ubuntu 22.04 Build Enviroment for Ezra Bible App + +FROM ubuntu:24.04 + +ARG HOST_USER + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -y update +RUN apt-get -y dist-upgrade +RUN apt-get -y install apt-utils +RUN apt-get -y update + +RUN apt-get install -y dialog build-essential libsword-dev libsqlite3-0 libcurl4-gnutls-dev libicu-dev zlib1g-dev \ + pkg-config icu-devtools subversion git vim sudo curl python3-software-properties cmake + +# AppImage dependencies +RUN apt-get install -y libfuse2 wget + +RUN apt-get install -y curl python3-software-properties +RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash +# Install node 14.17.5 +RUN export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install 14.17.5 && \ + npm install -g electron-packager electron-installer-debian + +RUN apt-get install -y unzip +RUN apt-get install -y xvfb + +RUN ln -s /usr/bin/python3 /usr/bin/python + +COPY docker/build_ubuntu_2404.sh /build.sh + +ENTRYPOINT ["/build.sh"] diff --git a/docker/build_ubuntu_2404.sh b/docker/build_ubuntu_2404.sh new file mode 100755 index 0000000..f91fbe2 --- /dev/null +++ b/docker/build_ubuntu_2404.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# This script triggers all the steps necessary for building and packaging Ezra Bible App on Linux. + +export NVM_DIR="/root/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +git config --global --add safe.directory /github/workspace + +npm run build-linux +npm run deb_2404 +cp release/packages/*.deb $GITHUB_WORKSPACE/ezra-bible-app_latest.deb + +if [ "$GITHUB_EVENT_NAME" = "release" ]; then + node_modules/.bin/sentry-cli --auth-token $SENTRY_TOKEN \ + upload-dif -o tobias-klein -p ezra-bible-app \ + node_modules/node-sword-interface/build/Release/node_sword_interface.node +fi \ No newline at end of file