Skip to content

Commit 22ecfe3

Browse files
committed
Include AppImage in nightly builds
1 parent 7b51cb5 commit 22ecfe3

3 files changed

Lines changed: 20 additions & 21 deletions

File tree

.github/workflows/build-appimage.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ name: Build - AppImage
66

77
on:
88
workflow_call:
9+
inputs:
10+
NIGHTLY:
11+
default: false
12+
type: boolean
913

1014
jobs:
1115
build:
@@ -60,7 +64,11 @@ jobs:
6064
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage"
6165
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage"
6266
chmod a+x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
63-
export VERSION=$(printf "dev-`git -C . rev-parse --short HEAD`")
67+
if [ "${{ inputs.NIGHTLY }}" = "true" ]; then
68+
export VERSION=$(date +%Y%m%d)
69+
else
70+
export VERSION=$(printf "dev-`git -C . rev-parse --short HEAD`")
71+
fi
6472
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" ./linuxdeploy-x86_64.AppImage --appdir=appdir --desktop-file=appdir/usr/share/applications/sqlitebrowser.desktop --plugin qt --output appimage
6573
6674
- name: Rename a file

.github/workflows/cppcmake-nightly.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,19 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
check-skip:
10-
runs-on: ubuntu-latest
11-
outputs:
12-
skip: ${{ steps.set-skip.outputs.skip }}
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- id: set-skip
17-
run: |
18-
git fetch origin tag nightly
19-
LAST_COMMIT_HASH=$(git rev-list -n 1 nightly)
20-
if [ "$(git rev-parse HEAD)" = "$LAST_COMMIT_HASH" ]; then
21-
echo "::notice::No new commits since last nightly build, skipping this build."
22-
echo "skip=true" >> $GITHUB_OUTPUT
23-
fi
24-
9+
build-appimage:
10+
if: needs.check-skip.outputs.skip != 'true'
11+
uses: ./.github/workflows/build-appimage.yml
12+
with:
13+
NIGHTLY: true
2514
build-macos:
26-
needs: check-skip
2715
if: needs.check-skip.outputs.skip != 'true'
2816
uses: ./.github/workflows/build-macos.yml
2917
secrets: inherit
3018
with:
3119
NIGHTLY: true
3220

3321
build-windows:
34-
needs: check-skip
3522
if: needs.check-skip.outputs.skip != 'true'
3623
uses: ./.github/workflows/build-windows.yml
3724
secrets: inherit

installer/other/get_nightlies_from_github_actions.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ echo "Successfully downloaded the nightly build"
3939

4040
# Check if the downloaded files are as expected
4141
# This case is occuring when the nightly build is skipped
42-
# for macOS Binaries
43-
if [ $(ls -l $DOWNLOAD_DIR | grep -c "$(date +%Y%m%d)") -ne 2 ]; then
42+
# for AppImage, macOS Binaries
43+
if [ $(ls -l $DOWNLOAD_DIR | grep -c "$(date +%Y%m%d)") -ne 4 ]; then
4444
echo "Last nightly build is skipped"
4545
exit 1
4646
fi
@@ -50,15 +50,19 @@ if [ $(ls -l $DOWNLOAD_DIR | grep -c "$(date +%Y-%m-%d)") -ne 4 ]; then
5050
exit 1
5151
fi
5252

53+
mv -v $DOWNLOAD_DIR*AppImage /nightlies/appimage/
5354
mv -v $DOWNLOAD_DIR*win32* /nightlies/win32/
5455
mv -v $DOWNLOAD_DIR*win64* /nightlies/win64/
5556
mv -v $DOWNLOAD_DIR*dmg /nightlies/macos-universal/
5657

58+
rm -v /nightlies/latest/*.AppImage
5759
rm -v /nightlies/latest/*.dmg
5860
rm -v /nightlies/latest/*.msi
5961
rm -v /nightlies/latest/*.zip
6062

6163
DATE=$(date +%Y%m%d)
64+
ln -sv /nightlies/appimage/DB.Browser.for.SQLCipher-$DATE.AppImage /nightlies/latest/DB.Browser.for.SQLCipher.AppImage
65+
ln -sv /nightlies/appimage/DB.Browser.for.SQLite-$DATE.AppImage /nightlies/latest/DB.Browser.for.SQLite.AppImage
6266
ln -sv /nightlies/macos-universal/DB.Browser.for.SQLCipher-universal_$DATE.dmg /nightlies/latest/DB.Browser.for.SQLCipher-universal.dmg
6367
ln -sv /nightlies/macos-universal/DB.Browser.for.SQLite-universal_$DATE.dmg /nightlies/latest/DB.Browser.for.SQLite-universal.dmg
6468
DATE=$(date +%Y-%m-%d)

0 commit comments

Comments
 (0)