Skip to content

Commit

Permalink
feat: build and release Linux and Windows versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-prudhomme committed May 29, 2020
1 parent b3c3845 commit c9c5264
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 5 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install Node Packages
run: npm ci

- name: Build Electron Packages
run: npx quasar build -m electron -T linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Tag
uses: olegtarasov/get-tag@v2
id: get-tag

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: linux
path: dist/electron/Packaged/roue-emotions-${{ steps.get-tag.outputs.tag }}.AppImage

build-win:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install Node Packages
run: npm ci

- name: Build Electron Packages
run: npx quasar build -m electron -T win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Tag
uses: olegtarasov/get-tag@v2
id: get-tag

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: win
path: dist/electron/Packaged/roue-emotions-${{ steps.get-tag.outputs.tag }}.exe

release:
needs:
- build-linux
- build-win
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}

- name: Download Artifacts
uses: actions/download-artifact@v2

- name: Get Tag
uses: olegtarasov/get-tag@v2
id: get-tag

- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: linux/roue-emotions-${{ steps.get-tag.outputs.tag }}.AppImage
asset_name: roue-emotions-${{ steps.get-tag.outputs.tag }}.AppImage
asset_content_type: application/octet-stream

- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: win/roue-emotions-${{ steps.get-tag.outputs.tag }}.exe
asset_name: roue-emotions-${{ steps.get-tag.outputs.tag }}.exe
asset_content_type: application/octet-stream
8 changes: 3 additions & 5 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,19 @@ module.exports = function (/* ctx */) {
linux: {
icon: 'src-electron/icons/icon.png',
target: [
'appimage',
'tar.gz'
'appimage'
]
},
mac: {
icon: 'src-electron/icons/icon.icns',
target: [
'tar.gz'
'dmg'
]
},
win: {
icon: 'src-electron/icons/icon.ico',
target: [
'portable',
'tar.gz'
'portable'
]
}
},
Expand Down

0 comments on commit c9c5264

Please sign in to comment.