2022-02-18 12:03:48 +01:00
|
|
|
name: Build & release desktop app
|
2022-02-18 11:49:53 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_on_linux:
|
2022-02-18 22:36:24 +01:00
|
|
|
name: "Build & release desktop app for ${{ matrix.os }}"
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
runtime: [ linux-x64, win-x64, osx-x64 ]
|
|
|
|
include:
|
|
|
|
- runtime: linux-x64
|
|
|
|
os: ubuntu-latest
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- runtime: osx-x64
|
|
|
|
os: macos-latest
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- runtime: win-x64
|
|
|
|
os: windows-latest
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
2022-02-18 11:49:53 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: "actions/checkout@v2.0.0"
|
|
|
|
|
|
|
|
- name: "Setup NodeJS"
|
2022-02-18 22:36:24 +01:00
|
|
|
uses: actions/setup-node@v2
|
2022-02-18 11:49:53 +01:00
|
|
|
with:
|
2022-02-18 22:36:24 +01:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-02-18 11:49:53 +01:00
|
|
|
|
|
|
|
- name: "Install dependencies"
|
|
|
|
run: yarn install --froze-lockfile
|
|
|
|
working-directory: "desktop"
|
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: "Build typescript"
|
2022-02-18 11:49:53 +01:00
|
|
|
run: yarn build
|
|
|
|
working-directory: "desktop"
|
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: "Build app"
|
2022-02-18 12:02:41 +01:00
|
|
|
run: yarn bundle --publish never
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-18 11:49:53 +01:00
|
|
|
working-directory: "desktop"
|
|
|
|
if: ${{ github.event_name != 'release' }}
|
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: "Build & publish App"
|
|
|
|
run: yarn release
|
2022-02-18 12:02:41 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-18 11:49:53 +01:00
|
|
|
working-directory: "desktop"
|
|
|
|
if: ${{ github.event_name == 'release' }}
|
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: Upload Linux .AppImage artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
2022-02-18 22:52:49 +01:00
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
2022-02-18 11:49:53 +01:00
|
|
|
with:
|
2022-02-18 22:36:24 +01:00
|
|
|
name: workadventure-desktop-linux-x64.AppImage
|
2022-02-18 22:52:49 +01:00
|
|
|
path: desktop/dist/workadventure-desktop-*-x86_64.AppImage
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: Upload Windows .exe artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: startsWith(matrix.os, 'windows')
|
|
|
|
with:
|
|
|
|
name: workadventure-desktop-win-x64.exe
|
2022-02-18 22:42:45 +01:00
|
|
|
path: desktop/dist/workadventure-desktop-*.exe
|
2022-02-18 11:49:53 +01:00
|
|
|
|
2022-02-18 22:36:24 +01:00
|
|
|
- name: Upload MacOS .dmg artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: startsWith(matrix.os, 'macos')
|
|
|
|
with:
|
|
|
|
name: workadventure-mac.dmg
|
2022-02-18 22:42:45 +01:00
|
|
|
path: desktop/dist/workadventure-desktop-*.dmg
|