mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-01-06 13:29:50 +01:00
Issue #189: Update AppImage workflow
This commit is contained in:
parent
b246a1325b
commit
9e98454294
90
.github/workflows/LinuxInstall.yml
vendored
90
.github/workflows/LinuxInstall.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: LinuxInstall
|
name: Linux_AppImage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
create:
|
create:
|
||||||
@ -17,18 +17,43 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libxcb-cursor0
|
sudo apt-get install -y libxcb-cursor0
|
||||||
sudo apt-get install -y libspeechd2
|
sudo apt-get install -y libspeechd2
|
||||||
sudo apt-get install -y gnupg wget
|
sudo apt-get install -y gnupg2 wget
|
||||||
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||||
chmod +x appimagetool-x86_64.AppImage
|
chmod +x appimagetool-x86_64.AppImage
|
||||||
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
|
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
|
||||||
|
|
||||||
|
- name: Configure GPG
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.gnupg
|
||||||
|
echo "use-agent" >> ~/.gnupg/gpg.conf
|
||||||
|
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
|
||||||
|
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
|
||||||
|
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
|
||||||
|
gpgconf --kill gpg-agent
|
||||||
|
echo "GPG configuration complete."
|
||||||
|
chmod 700 ~/.gnupg
|
||||||
|
|
||||||
- name: Import PGP private key
|
- name: Import PGP private key
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.PGP_PRIVATE_KEY }}" | gpg --batch --import
|
echo "${{ secrets.PGP_PRIVATE_KEY }}" | gpg --batch --import
|
||||||
echo "${{ secrets.PGP_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --pinentry-mode loopback --sign-key "${{ secrets.PGP_KEY_ID }}"
|
for keygrip in $(gpg --list-secret-keys --with-keygrip "${{ secrets.PGP_KEY_ID }}" | grep Keygrip | awk '{print $3}'); do
|
||||||
|
echo "${{ secrets.PGP_PASSPHRASE }}" | "$(gpgconf --list-dirs libexecdir)"/gpg-preset-passphrase --preset $keygrip
|
||||||
|
done
|
||||||
env:
|
env:
|
||||||
GNUPGHOME: /home/runner/.gnupg
|
GNUPGHOME: /home/runner/.gnupg
|
||||||
|
|
||||||
|
- name: Create Test signature
|
||||||
|
run: |
|
||||||
|
echo "TEST" >> ~/test_with_passphrase.txt
|
||||||
|
echo "TEST" >> ~/test_without_passphrase.txt
|
||||||
|
gpg --batch --yes --verbose --passphrase "${{ secrets.PGP_PASSPHRASE }}" --pinentry-mode loopback --detach-sign --local-user "${{ secrets.PGP_KEY_ID }}" --output ~/test_with_passphrase.txt.sig ~/test_with_passphrase.txt
|
||||||
|
gpg --batch --yes --verbose --pinentry-mode loopback --detach-sign --local-user "${{ secrets.PGP_KEY_ID }}" --output ~/test_without_passphrase.txt.sig ~/test_without_passphrase.txt
|
||||||
|
|
||||||
|
- name: Verify Test signature
|
||||||
|
run: |
|
||||||
|
gpg --batch --yes --verbose --verify ~/test_with_passphrase.txt.sig ~/test_with_passphrase.txt
|
||||||
|
gpg --batch --yes --verbose --verify ~/test_without_passphrase.txt.sig ~/test_without_passphrase.txt
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -57,9 +82,9 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-vcpkg-v2-
|
${{ runner.os }}-vcpkg-v2-
|
||||||
|
|
||||||
- name: 'VCPKG: Install project dependencies'
|
- name: 'VCPKG: Install Project Dependencies'
|
||||||
run: |
|
run: |
|
||||||
./vcpkg install tbb openssl lcms zlib openjpeg freetype ijg-libjpeg libpng blend2d
|
./vcpkg install tbb openssl lcms zlib openjpeg freetype ijg-libjpeg libpng blend2d brotli bzip2 --triplet x64-linux-release
|
||||||
working-directory: vcpkg
|
working-directory: vcpkg
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
@ -74,47 +99,48 @@ jobs:
|
|||||||
cache: 'true'
|
cache: 'true'
|
||||||
cache-key-prefix: ${{ runner.os }}-qt-672
|
cache-key-prefix: ${{ runner.os }}-qt-672
|
||||||
|
|
||||||
- name: Build project
|
- name: Build Project
|
||||||
working-directory: pdf4qt
|
working-directory: pdf4qt
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DVCPKG_OVERLAY_PORTS=vcpkg/overlays -DPDF4QT_INSTALL_TO_USR=ON
|
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DVCPKG_OVERLAY_PORTS=vcpkg/overlays -DPDF4QT_INSTALL_TO_USR=ON
|
||||||
cmake --build build -j6
|
cmake --build build -j6
|
||||||
cmake --install build
|
cmake --install build
|
||||||
cp -rp build/install build/install_appimage
|
|
||||||
|
|
||||||
- name: 'Linux Deploy Qt'
|
- name: 'Linux Deploy Qt'
|
||||||
working-directory: pdf4qt/build
|
working-directory: pdf4qt/build
|
||||||
run: |
|
run: |
|
||||||
|
cp install/usr/share/icons/hicolor/scalable/apps/io.github.JakubMelka.Pdf4qt.svg install/io.github.JakubMelka.Pdf4qt.svg
|
||||||
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
|
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
|
||||||
chmod +x deploy.AppImage
|
chmod +x deploy.AppImage
|
||||||
./deploy.AppImage install/usr/share/applications/io.github.JakubMelka.Pdf4qt.desktop -executable-dir=install/usr/bin -extra-plugins=iconengines,imageformats,texttospeech
|
./deploy.AppImage install/usr/share/applications/io.github.JakubMelka.Pdf4qt.desktop -executable-dir=install/usr/bin -extra-plugins=iconengines,imageformats,texttospeech
|
||||||
|
|
||||||
|
- name: Sign and Repack AppImage
|
||||||
|
working-directory: pdf4qt/build
|
||||||
|
run: |
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
echo "${{ secrets.PGP_PASSPHRASE }}" | appimagetool -s --sign-key "${{ secrets.PGP_KEY_ID }}" install/ io.github.JakubMelka.Pdf4qt.AppImage
|
||||||
|
|
||||||
|
- name: Manual signature
|
||||||
|
run: |
|
||||||
|
gpg --batch --yes --verbose --pinentry-mode loopback --detach-sign --passphrase "${{ secrets.PGP_PASSPHRASE }}" --local-user "${{ secrets.PGP_KEY_ID }}" --output pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
|
||||||
|
|
||||||
- name: Make DEB package
|
- name: Verify AppImage Detached Signature
|
||||||
working-directory: pdf4qt/build
|
|
||||||
run: |
|
run: |
|
||||||
sh make-package.sh
|
echo "${{ secrets.PGP_PUBLIC_KEY }}" | gpg --batch --import
|
||||||
|
gpg --verify pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
|
||||||
- name: Upload DEB package
|
|
||||||
uses: actions/upload-artifact@v4
|
- name: Upload AppImage Package
|
||||||
with:
|
|
||||||
name: ubuntu-deb-package
|
|
||||||
path: ./pdf4qt/build/*.deb
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: 'Make AppImage'
|
|
||||||
working-directory: pdf4qt/build
|
|
||||||
run: |
|
|
||||||
cp install_appimage/usr/share/icons/hicolor/scalable/apps/io.github.JakubMelka.Pdf4qt.svg install_appimage/io.github.JakubMelka.Pdf4qt.svg
|
|
||||||
./deploy.AppImage install_appimage/usr/share/applications/io.github.JakubMelka.Pdf4qt.desktop -appimage -executable-dir=install_appimage/usr/bin -always-overwrite -extra-plugins=iconengines,imageformats,texttospeech
|
|
||||||
|
|
||||||
- name: Sign AppImage
|
|
||||||
run: |
|
|
||||||
appimagetool --sign --sign-key "${{ secrets.PGP_KEY_ID }}" ./pdf4qt/build/*.AppImage
|
|
||||||
|
|
||||||
- name: Upload AppImage package
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ubuntu-appimage
|
name: ubuntu-appimage
|
||||||
path: ./pdf4qt/build/*.AppImage
|
path: ./pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
|
- name: Upload AppImage Signature File
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ubuntu-appimage-sig
|
||||||
|
path: ./pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: warn
|
||||||
|
compression-level: 0
|
||||||
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -54,7 +54,7 @@ jobs:
|
|||||||
- name: Build project
|
- name: Build project
|
||||||
working-directory: pdf4qt
|
working-directory: pdf4qt
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release
|
||||||
cmake --build build -j6
|
cmake --build build -j6
|
||||||
cmake --install build
|
cmake --install build
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ jobs:
|
|||||||
working-directory: pdf4qt
|
working-directory: pdf4qt
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DPDF4QT_INSTALL_QT_DEPENDENCIES=ON -DPDF4QT_INSTALL_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="${env:GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DPDF4QT_QT_ROOT="${env:Qt6_DIR}" -DPDF4QT_INSTALL_MSVC_REDISTRIBUTABLE=ON -DPDF4QT_INSTALL_PREPARE_WIX_INSTALLER=ON -DPDF4QT_INSTALL_TO_USR=ON
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DPDF4QT_INSTALL_QT_DEPENDENCIES=ON -DPDF4QT_INSTALL_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="${env:GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DPDF4QT_QT_ROOT="${env:Qt6_DIR}" -DPDF4QT_INSTALL_MSVC_REDISTRIBUTABLE=ON -DPDF4QT_INSTALL_PREPARE_WIX_INSTALLER=ON -DPDF4QT_INSTALL_TO_USR=ON
|
||||||
cmake --build build --config Release -j6
|
cmake --build build --config Release -j6
|
||||||
cmake --install build
|
cmake --install build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user