From 0b2dc99b2e9f5883f881d6b060d8b6fa7db80c66 Mon Sep 17 00:00:00 2001 From: squalou Date: Thu, 30 Nov 2023 16:21:36 +0100 Subject: [PATCH] fix #82 build rpm phase by adding fpm dependency, fix output file names, separate checksum files to make sure AUR scripts wont fail on Arch packaging system --- .../workflows/release-desktop-package.yaml | 47 ++++++++++++++----- package.json | 4 +- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-desktop-package.yaml b/.github/workflows/release-desktop-package.yaml index aeccdff..520b702 100644 --- a/.github/workflows/release-desktop-package.yaml +++ b/.github/workflows/release-desktop-package.yaml @@ -45,6 +45,10 @@ jobs: id: extract_package_version uses: Saionaro/extract-package-version@v1.1.1 + - name: Install dependencies + if: runner.os != 'Windows' + run: sudo apt-get install -y ruby-dev build-essential && sudo gem install fpm + - name: Install npm modules run: npm install @@ -52,45 +56,62 @@ jobs: run: npm run dist - name: Build rpm desktop app + if: runner.os == 'Linux' run: npm run dist:rpm - - name: Create check sum file for deb and rpm + - name: Create check sum file for deb if: matrix.config.os == 'ubuntu-latest' - run: sha512sum *.deb *.rpm > google-chat-linux-SHA512.txt + run: sha512sum *.deb > google-chat-linux-SHA512.txt working-directory: dist - - name: Upload Debian package to release + - name: Create check sum file for rpm + if: matrix.config.os == 'ubuntu-latest' + run: sha512sum *.rpm > google-chat-linux-rpm-SHA512.txt + working-directory: dist + + - name: Upload deb check sum file to release if: matrix.config.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: dist/google-chat-linux_${{ steps.extract_package_version.outputs.version }}_amd64.deb - asset_name: google-chat-linux_${{ steps.extract_package_version.outputs.version }}_amd64.deb - asset_content_type: application/octet-stream + asset_path: dist/google-chat-linux-SHA512.txt + asset_name: google-chat-linux-SHA512.txt + asset_content_type: text/plain - - name: Upload rpm package to release + - name: Upload rpm check sum file to release + if: matrix.config.os == 'ubuntu-latest' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: dist/google-chat-linux-rpm-SHA512.txt + asset_name: google-chat-linux-rpm-SHA512.txt + asset_content_type: text/plain + + - name: Upload Debian package to release if: matrix.config.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: dist/google-chat-linux_${{ steps.extract_package_version.outputs.version }}_x86_64.rpm - asset_name: google-chat-linux_${{ steps.extract_package_version.outputs.version }}_x86_64.rpm + asset_path: dist/google-chat-linux_${{ steps.extract_package_version.outputs.version }}_amd64.deb + asset_name: google-chat-linux_${{ steps.extract_package_version.outputs.version }}_amd64.deb asset_content_type: application/octet-stream - - name: Upload deb and rpm check sum file to release + - name: Upload rpm package to release if: matrix.config.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: dist/google-chat-linux-SHA512.txt - asset_name: google-chat-linux-SHA512.txt - asset_content_type: text/plain + asset_path: dist/google-chat-linux-${{ steps.extract_package_version.outputs.version }}.x86_64.rpm + asset_name: google-chat-linux-${{ steps.extract_package_version.outputs.version }}.x86_64.rpm + asset_content_type: application/octet-stream - name: Create Exe check sum file if: matrix.config.os == 'windows-latest' diff --git a/package.json b/package.json index c55cbf9..7257c3c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,9 @@ ] }, "rpm": { - "fpm": ["--rpm-rpmbuild-define=_build_id_links none"] + "fpm": [ + "--rpm-rpmbuild-define=_build_id_links none" + ] }, "win": { "target": [