1- name : Build - macOS
1+ name : Build ( macOS)
22
33on :
44 workflow_call :
55 inputs :
66 NIGHTLY :
77 default : false
88 type : boolean
9+ workflow_dispatch :
910
1011jobs :
1112 build :
12- name : ${{ matrix.os }} - SQLCipher ${{ matrix.sqlcipher }}
13+ name : ${{ matrix.os }} ( ${{ matrix.bundle }})
1314 runs-on : ${{ matrix.os }}
1415 strategy :
1516 fail-fast : false
1617 matrix :
18+ bundle : [SQLCipher, SQLite]
1719 os : [macos-14]
18- sqlcipher : ["0", "1"]
1920 env :
2021 MACOSX_DEPLOYMENT_TARGET : 10.13
2122 steps :
@@ -28,35 +29,38 @@ jobs:
2829 run : |
2930 sudo rm -rfv /Library/Frameworks/Mono.framework
3031 sudo pkgutil --forget com.xamarin.mono-MDK.pkg
31- sudo rm /etc/paths.d/mono-commands
32+ sudo rm -v /etc/paths.d/mono-commands
3233
3334 - name : Install dependencies
3435 run : |
35- brew update
3636 brew tap sqlitebrowser/tap
37- brew unlink openssl@3
38- brew install sqlb-openssl@3
3937 brew install sqlb-qt@5 sqlb-sqlcipher sqlb-sqlite ninja
4038 npm install -g appdmg
4139
4240 - name : Configure build
4341 run : |
4442 if [ "${{ inputs.NIGHTLY }}" = "true" ]; then
45- if [ "${{ matrix.sqlcipher }}" = "1 " ]; then
43+ if [ "${{ matrix.bundle }}" = "SQLCipher " ]; then
4644 sed -i "" 's/"DB Browser for SQLite"/"DB Browser for SQLCipher Nightly"/' config/platform_apple.cmake
4745 else
4846 sed -i "" 's/"DB Browser for SQLite"/"DB Browser for SQLite Nightly"/' config/platform_apple.cmake
4947 fi
5048 else
51- if [ "${{ matrix.sqlcipher }}" = "1 " ]; then
49+ if [ "${{ matrix.bundle }}" = "SQLCipher " ]; then
5250 sed -i "" 's/"DB Browser for SQLite"/"DB Browser for SQLCipher-dev-'$(git rev-parse --short --verify HEAD)'"/' config/platform_apple.cmake
5351 else
5452 sed -i "" 's/"DB Browser for SQLite"/"DB Browser for SQLite-dev-'$(git rev-parse --short --verify HEAD)'"/' config/platform_apple.cmake
5553 fi
5654 fi
5755
58- mkdir build && cd build
59- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DcustomTap=1 -DENABLE_TESTING=ON -Dsqlcipher=${{ matrix.sqlcipher }} ..
56+ mkdir -v build && cd build
57+ cmake -G Ninja \
58+ -DCMAKE_BUILD_TYPE=Release \
59+ -DCMAKE_CXX_STANDARD=14 \
60+ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
61+ -DcustomTap=1 \
62+ -DENABLE_TESTING=ON \
63+ -Dsqlcipher=${{ matrix.bundle == 'SQLCipher' }} ..
6064
6165 - name : Build
6266 working-directory : ./build
@@ -81,18 +85,27 @@ jobs:
8185 KEYCHAIN_PW : ${{ secrets.MACOS_CODESIGN_KEYCHAIN_PW }}
8286 P12 : ${{ secrets.MACOS_CODESIGN_P12 }}
8387 P12_PW : ${{ secrets.MACOS_CODESIGN_P12_PW }}
84- NIGHTLY : ${{ inputs.NIGHTLY }}
85- SQLCIPHER : ${{ matrix.sqlcipher }}
88+ NIGHTLY : ${{ inputs.NIGHTLY || false }}
89+ SQLCIPHER : ${{ matrix.bundle == 'SQLCipher' }}
8690 TEAM_ID : ${{ secrets.MACOS_CODESIGN_TEAM_ID }}
8791
8892 - if : steps.notarization.conclusion != 'skipped'
8993 name : Clear Keychain
9094 run : security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
9195 continue-on-error : true
9296
93- - if : github.event_name != 'pull_request'
97+ - if : github.event_name != 'pull_request' && github.workflow != 'Build (macOS)'
9498 name : Upload artifacts
9599 uses : actions/upload-artifact@v4
96100 with :
97- name : build-artifacts-${{ matrix.os }}-${{ matrix.sqlcipher }}
101+ name : build-artifacts-${{ matrix.os }}-${{ matrix.bundle }}
98102 path : DB.Browser.for.*.dmg
103+ retention-days : 1
104+
105+ - if : github.event_name == 'workflow_dispatch' || github.event_name == 'Build (macOS)'
106+ name : Release
107+ uses : softprops/action-gh-release@v2
108+ with :
109+ files : DB.Browser.for.*.dmg
110+ prerelease : true
111+ tag_name : ${{ github.sha }}-macos
0 commit comments