Skip to content

Commit

Permalink
Use release build in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmi committed May 28, 2021
1 parent 4cfca22 commit 0def592
Showing 1 changed file with 20 additions and 42 deletions.
62 changes: 20 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,30 @@ jobs:
shell: bash
- name: Build
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd ..
ls build
cmake -S . -B build
cmake --build build --config Release
- name: Deploy macOS
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'macos-latest'
run: |
mv build/effort-log.app build/EffortLog.app
macdeployqt build/EffortLog.app -always-overwrite -verbose=3 -appstore-compliant -dmg
otool -L build/EffortLog.app/Contents/MacOS/EffortLog
mv build/EffortLog.dmg EffortLog_${{ steps.get_version.outputs.VERSION }}_osx.dmg
rm -rf build
macdeployqt build/effort-log.app -always-overwrite -verbose=3 -appstore-compliant -dmg
otool -L build/effort-log.app/Contents/MacOS/effort-log
mv build/effort-log.dmg effort-log_${{ steps.get_version.outputs.VERSION }}_osx.dmg
- name: Deploy Windows
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'windows-latest'
shell: cmd
run: |
mkdir bin
windeployqt --verbose 2 --no-translations --dir .\bin .\build\effort-log.exe
move .\build\effort-log.exe .\bin
windeployqt --verbose 2 --no-translations --dir .\bin .\build\Release\effort-log.exe
move .\build\Release\effort-log.exe .\bin
cd .\bin
7z a effort-log_${{ steps.get_version.outputs.VERSION }}_win64.zip .\*
cd ..
mv .\bin\effort-log_${{ steps.get_version.outputs.VERSION }}_win64.zip .\
rmdir /Q /S bin
- name: Release macOS
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'macos-latest'
with:
files: EffortLog_*.dmg
files: effort-log_*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Windows
Expand Down Expand Up @@ -96,58 +89,43 @@ jobs:
- name: Build encrypted Linux
if: matrix.os == 'ubuntu-latest'
run: |
mkdir build
cd build
cmake -DCRYPT=ON ..
cmake --build .
cd ..
ls build
cmake -DCRYPT=ON -S . -B build
cmake --build build --config Release
- name: Build encrypted MacOS
if: matrix.os == 'macos-latest'
run: |
mkdir build
cd build
cmake -DCRYPT=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
cmake --build .
cd ..
ls build
cmake -DCRYPT=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -S . -B build
cmake --build build --config Release
- name: Build encrypted Windows
if: matrix.os == 'windows-latest'
run: |
choco install openssl -y
mkdir build
cd build
cmake -DCRYPT=ON -DOPENSSL_ROOT_DIR="C:\Program Files\OpenSSL-Win64" ..
cmake --build .
cd ..
ls build
cmake -DCRYPT=ON -DOPENSSL_ROOT_DIR="C:\Program Files\OpenSSL-Win64" -S . -B build
cmake --build build --config Release
- name: Deploy encrypted macOS
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'macos-latest'
run: |
mv build/effort-log.app build/EffortLog.app
macdeployqt build/EffortLog.app -always-overwrite -verbose=3 -appstore-compliant -dmg
otool -L build/EffortLog.app/Contents/MacOS/EffortLog
mv build/EffortLog.dmg EffortLog_${{ steps.get_version.outputs.VERSION }}_osx_encrypted.dmg
rm -rf build
macdeployqt build/effort-log.app -always-overwrite -verbose=3 -appstore-compliant -dmg
otool -L build/effort-log.app/Contents/MacOS/effort-log
mv build/effort-log.dmg effort-log_${{ steps.get_version.outputs.VERSION }}_osx_encrypted.dmg
- name: Deploy encrypted Windows
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'windows-latest'
shell: cmd
run: |
mkdir bin
windeployqt --verbose 2 --no-translations --dir .\bin .\build\effort-log.exe
move .\build\effort-log.exe .\bin
windeployqt --verbose 2 --no-translations --dir .\bin .\build\Release\effort-log.exe
move .\build\Release\effort-log.exe .\bin
copy "C:\Program Files\OpenSSL-Win64\libcrypto-1_1-x64.dll" bin\libcrypto-1_1-x64.dll
copy "C:\Program Files\OpenSSL-Win64\libssl-1_1-x64.dll" bin\libssl-1_1-x64.dll
cd .\bin
7z a effort-log_${{ steps.get_version.outputs.VERSION }}_win64_encrypted.zip .\*
cd ..
mv .\bin\effort-log_${{ steps.get_version.outputs.VERSION }}_win64_encrypted.zip .\
rmdir /Q /S bin
- name: Release macOS
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && matrix.qt_version == '6.1.0' && matrix.os == 'macos-latest'
with:
files: EffortLog_*.dmg
files: effort-log_*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Windows
Expand Down

0 comments on commit 0def592

Please sign in to comment.