AUR package fix #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release desktop package | |
on: | |
push: | |
tags: | |
- '*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Create release | |
runs-on: ubuntu-latest | |
# Note this. We are going to use that in further jobs. | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Get tag name | |
id: tag | |
run: echo ::set-output name=NAME::${GITHUB_REF/refs\/tags\//} | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ steps.tag.outputs.NAME }} | |
release_assets: | |
name: Release assets | |
needs: release # we need to know the upload URL | |
runs-on: ${{ matrix.config.os }} # we run many different builds | |
strategy: | |
matrix: | |
config: | |
- os: ubuntu-latest | |
- os: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Extract package version | |
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 | |
if: matrix.config.os == 'ubuntu-latest' | |
run: sha512sum *.deb > google-chat-linux-SHA512.txt | |
working-directory: dist | |
- 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-SHA512.txt | |
asset_name: google-chat-linux-SHA512.txt | |
asset_content_type: text/plain | |
- 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 }}_amd64.deb | |
asset_name: google-chat-linux_${{ steps.extract_package_version.outputs.version }}_amd64.deb | |
asset_content_type: application/octet-stream | |
- 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-${{ 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' | |
run: sha512sum *.exe > google-chat-win-SHA512.txt | |
working-directory: dist | |
- name: Upload Exe package to release | |
if: matrix.config.os == 'windows-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 Setup ${{ steps.extract_package_version.outputs.version }}.exe | |
asset_name: google-chat-linux_Setup_${{ steps.extract_package_version.outputs.version }}.exe | |
asset_content_type: application/octet-stream | |
- name: Upload Exe check sum file to release | |
if: matrix.config.os == 'windows-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-win-SHA512.txt | |
asset_name: google-chat-win-SHA512.txt | |
asset_content_type: text/plain |