diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e807201b..1fcf909f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,12 @@ jobs: with: submodules: 'recursive' path: albert - + - name: Create archives run: | tar --exclude=".*" -czvf ${{ github.ref_name }}.tar.gz albert zip -r ${{ github.ref_name }}.zip albert -x "*/.*" - + - name: Release uses: softprops/action-gh-release@v1 with: @@ -48,17 +48,17 @@ jobs: - os: macos-14 buildname: macOS arm64 arch: 'arm64' - + steps: - + - name: Checkout source code uses: actions/checkout@v3 with: submodules: recursive - + - name: Get latest CMake and ninja uses: lukka/get-cmake@latest - + #- name: Install Qt dependencies # uses: jurplel/install-qt-action@v3 # with: @@ -75,7 +75,7 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 run: brew install llvm qt python libqalculate # libarchive sparkle - + #- name: Restore macports dependencies # id: cache-macports # ref'ed below # uses: actions/cache/restore@v4 @@ -84,7 +84,7 @@ jobs: # /opt/local/lib # /opt/local/include # key: ${{ matrix.os }}-macports-r2 - + #- name: Install macports (for universal binaries of libqalculate and libarchive) # if: steps.cache-macports.outputs.cache-hit != 'true' # run: | @@ -103,11 +103,11 @@ jobs: # ;; # esac # sudo sh -c 'echo "\n+universal" >> /opt/local/etc/macports/variants.conf' - + #- name: Install dependencies using macports # if: steps.cache-macports.outputs.cache-hit != 'true' # run : sudo /opt/local/bin/port install libqalculate libarchive # increase steps.cache-macports.outputs.cache-primary-key revision on change - + #- name: Save macports dependencies # uses: actions/cache/save@v4 # with: @@ -115,7 +115,7 @@ jobs: # /opt/local/lib # /opt/local/include # key: ${{ steps.cache-macports.outputs.cache-primary-key }} - + - name: Build and package run: | cmake -S . -B build \ @@ -123,9 +123,9 @@ jobs: -DBUILD_PLUGIN_DEBUG=OFF \ -DBUILD_PLUGIN_DOCS=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo - #-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" + #-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" cmake --build build - + - name: Build and package run: cd build && cpack -V @@ -137,16 +137,17 @@ jobs: - name: Append suffix run: | - mv build/Albert-${{ github.ref_name }}.dmg build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg - mv build/Albert-${{ github.ref_name }}.dmg.sha256 build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg.sha256 - + dmg=build/Albert-*.dmg + mv "${dmg}" "${dmg::-4}-${{ matrix.arch }}.dmg" + mv "${dmg}".sha256 "${dmg::-4}-${{ matrix.arch }}.dmg.sha256" + - name: Upload macOS bundle uses: actions/upload-artifact@v4 with: name: macos-release-artifacts path: | - build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg - build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg.sha256 + build/*.dmg + build/*.sha256 #appcast_item.txt Relase: @@ -158,10 +159,10 @@ jobs: uses: actions/download-artifact@v4 with: name: macos-release-artifacts - + - name: list files run: find . - + - name: Upload uses: softprops/action-gh-release@v1 with: @@ -170,7 +171,7 @@ jobs: build/Albert-${{ github.ref_name }}-amd64.dmg.sha256 build/Albert-${{ github.ref_name }}-x86_64.dmg build/Albert-${{ github.ref_name }}-x86_64.dmg.sha256 - + # Appcast: # needs: Relase # if: startsWith(github.ref, 'refs/tags/') @@ -185,7 +186,7 @@ jobs: #- name: list files # run: find . - + #- run: sed -i -e '/<\/language>/r appcast_item.txt' src/appcast.xml #- name: Push appcast @@ -205,11 +206,11 @@ jobs: dockerfile: [arch.Dockerfile, fedora.Dockerfile, ubuntu.Dockerfile] steps: - + - name: Checkout source code uses: actions/checkout@v3 with: submodules: recursive - + - name: Build docker test image run: docker build . --file .docker/${{ matrix.dockerfile }}