From 0daa51d9703221ee6a5b917a0931df7213d5e9bc Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Thu, 29 Feb 2024 09:40:41 -0500 Subject: [PATCH] Refactor this --- .github/workflows/publish-appimage.yml | 29 +++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-appimage.yml b/.github/workflows/publish-appimage.yml index 4efe4e3a..80b94d7e 100644 --- a/.github/workflows/publish-appimage.yml +++ b/.github/workflows/publish-appimage.yml @@ -86,34 +86,33 @@ jobs: run: | echo "${{ secrets.GPG_DEPLOY_KEY }}" > appimage/secret.gpg gpg --import appimage/secret.gpg - - name: Install libc++, set CC and CXX env vars for ubuntu-22.04 - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt-get install -yqq --no-install-recommends \ - libc++-14-dev \ - libc++abi-14-dev - echo "CC=clang-14" >> $GITHUB_ENV - echo "CXX=clang++-14" >> $GITHUB_ENV - - name: Install libc++, set CC and CXX env vars for ubuntu-20.04 + - name: Set clang version to 12 for ubuntu-20.04 if: matrix.os == 'ubuntu-20.04' + run: | + echo "CLANG_VERSION=12" >> $GITHUB_ENV + - name: Set clang version to 14 for ubuntu-22.04 + if: matrix.os == 'ubuntu-22.04' + run: | + echo "CLANG_VERSION=14" >> $GITHUB_ENV + - name: Install libc++, set CC and CXX env vars run: | sudo apt-get install -yqq --no-install-recommends \ - libc++-12-dev \ - libc++abi-12-dev - echo "CC=clang-12" >> $GITHUB_ENV - echo "CXX=clang++-12" >> $GITHUB_ENV + libc++-${CLANG-VERSION}-dev \ + libc++abi-${CLANG-VERSION}-dev + echo "CC=clang-${CLANG-VERSION}" >> $GITHUB_ENV + echo "CXX=clang++-${CLANG-VERSION}" >> $GITHUB_ENV - name: Build AppImage run: ./appimage/build.sh - name: Upload AppImage artifact uses: actions/upload-artifact@v4 with: - name: "conky-${{ matrix.os }}-${{ matrix.arch }}-${{ env.GIT_VERSION }}.AppImage" + name: 'conky-${{ matrix.os }}-${{ matrix.arch }}-${{ env.GIT_VERSION }}.AppImage' path: conky-x86_64.AppImage if-no-files-found: error - name: Upload AppImage checksum artifact uses: actions/upload-artifact@v4 with: - name: "conky-${{ matrix.os }}-${{ matrix.arch }}-${{ env.GIT_VERSION }}.AppImage.sha256" + name: 'conky-${{ matrix.os }}-${{ matrix.arch }}-${{ env.GIT_VERSION }}.AppImage.sha256' path: conky-x86_64.AppImage.sha256 if-no-files-found: error - name: Upload man page artifact