Skip to content

Commit

Permalink
fix #82 build rpm phase by adding fpm dependency, fix output file nam…
Browse files Browse the repository at this point in the history
…es, separate checksum files to make sure AUR scripts wont fail on Arch packaging system
  • Loading branch information
squalou committed Nov 30, 2023
1 parent 43adcbe commit 0b2dc99
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
47 changes: 34 additions & 13 deletions .github/workflows/release-desktop-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,52 +45,73 @@ 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

- name: Build deb desktop app
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'
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
]
},
"rpm": {
"fpm": ["--rpm-rpmbuild-define=_build_id_links none"]
"fpm": [
"--rpm-rpmbuild-define=_build_id_links none"
]
},
"win": {
"target": [
Expand Down

0 comments on commit 0b2dc99

Please sign in to comment.