From 1b5c4485be725db976ebb656f5bff2ca74755af2 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 8 Jul 2021 21:44:28 +0200 Subject: [PATCH] Enable gtk windows CI build, use ci version in assets --- .github/workflows/build.yml | 34 +++++++++++++++++++++++--------- packaging/win32/makeinstaller.sh | 6 +++++- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ed91d8e..e776265c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,14 +16,12 @@ jobs: VERSION=$(basename ${{ github.ref }}) else VERSION=ci-latest-$(basename ${{ github.ref }}) - PREV_RELEASE=$(curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$VERSION | jq -r .url) fi - PACKAGE_VERSION=$(grep -oP 'SET\(PACKAGE_VERSION \K([\d\.]+)(?=\))' CMakeLists.txt) echo "##[set-output name=version;]$VERSION" - echo "##[set-output name=prev_release;]${PREV_RELEASE/null/}" - echo "##[set-output name=pkg_version;]$PACKAGE_VERSION" - name: Build application - run: docker run -v $PWD:/workspace gimagereader-mingw-buildenv ./packaging/win32/makeinstaller.sh x86_64 + run: | + docker run -v $PWD:/workspace gimagereader-mingw-buildenv ./packaging/win32/makeinstaller.sh x86_64 qt5 nodebug ${{ steps.version_number.outputs.version }} + docker run -v $PWD:/workspace gimagereader-mingw-buildenv ./packaging/win32/makeinstaller.sh x86_64 gtk nodebug ${{ steps.version_number.outputs.version }} - name: Reset ci-latest tag run: | VERSION=${{ steps.version_number.outputs.version }} @@ -48,21 +46,39 @@ jobs: release_name: CI Build draft: false prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} - - name: Upload portable zip release asset + - name: Upload qt5 portable zip release asset uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.pkg_version }}_qt5_x86_64.zip + asset_path: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_x86_64.zip asset_name: gImageReader_latest_qt5_x86_64.zip asset_content_type: application/zip - - name: Upload installer release asset + - name: Upload qt5 installer release asset uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.pkg_version }}_qt5_x86_64.exe + asset_path: ./build/mingw64-qt5/gImageReader_${{ steps.version_number.outputs.version }}_qt5_x86_64.exe asset_name: gImageReader_latest_qt5_x86_64.exe asset_content_type: application/x-dosexec + - name: Upload gtk portable zip release asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64.zip + asset_name: gImageReader_latest_gtk_x86_64.zip + asset_content_type: application/zip + - name: Upload gtk installer release asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/mingw64-gtk/gImageReader_${{ steps.version_number.outputs.version }}_gtk_x86_64.exe + asset_name: gImageReader_latest_gtk_x86_64.exe + asset_content_type: application/x-dosexec diff --git a/packaging/win32/makeinstaller.sh b/packaging/win32/makeinstaller.sh index 821c15ae..aeb15c70 100755 --- a/packaging/win32/makeinstaller.sh +++ b/packaging/win32/makeinstaller.sh @@ -204,6 +204,10 @@ if [ $withdebug ]; then variant="_debug" fi +if [ ! -z $4 ]; then + progVersion="$4" +fi + # Build portable zip pushd $builddir ln -s root ${progName}_${progVersion}_${iface} @@ -217,4 +221,4 @@ makensis -DNAME=$progName -DARCH=$arch -DVARIANT="$variant" -DPROGVERSION="$prog # Cleanup rm -rf $installroot -echo "Installer written to $PWD/${progName}_${progVersion}_${iface}_${arch}.exe" \ No newline at end of file +echo "Installer written to $PWD/${progName}_${progVersion}_${iface}_${arch}.exe"