add release and electron-builder setup
This commit is contained in:
parent
d64c7f9605
commit
1c1d61bd60
104
.github/workflows/build-and-release-desktop.yml
vendored
Normal file
104
.github/workflows/build-and-release-desktop.yml
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
name: Build & Release Desktop App
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build_on_linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.0.0"
|
||||
|
||||
- name: "Setup NodeJS"
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: yarn install --froze-lockfile
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build Typescript"
|
||||
run: yarn build
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build App"
|
||||
run: yarn bundle
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
|
||||
- name: "Build & Publish App"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn release
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
|
||||
build_on_mac:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.0.0"
|
||||
|
||||
- name: "Setup NodeJS"
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: yarn install --froze-lockfile
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build Typescript"
|
||||
run: yarn build
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build App"
|
||||
run: yarn bundle
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
|
||||
- name: "Build & Publish App"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn release
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
|
||||
build_on_win:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.0.0"
|
||||
|
||||
- name: "Setup NodeJS"
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: yarn install --froze-lockfile
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build Typescript"
|
||||
run: yarn build
|
||||
working-directory: "desktop"
|
||||
|
||||
- name: "Build App"
|
||||
run: yarn bundle
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
|
||||
- name: "Build & Publish App"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn release
|
||||
working-directory: "desktop"
|
||||
if: ${{ github.event_name == 'release' }}
|
2
desktop/.gitignore
vendored
2
desktop/.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
/dist/
|
||||
/node_modules/
|
||||
/dist/bundle.js
|
||||
/yarn-error.log
|
||||
/build/
|
33
desktop/electron-builder.yml
Normal file
33
desktop/electron-builder.yml
Normal file
@ -0,0 +1,33 @@
|
||||
appId: re.workadventu.desktop
|
||||
|
||||
files:
|
||||
- "build/**/*"
|
||||
- "assets/**/*"
|
||||
- "sidebar/**/*"
|
||||
|
||||
dmg:
|
||||
icon: false
|
||||
|
||||
linux:
|
||||
category: "TODO;TODO"
|
||||
packageCategory: "TODO;TODO"
|
||||
maintainer: "TODO"
|
||||
icon: "assets/icons/TODO.icns"
|
||||
description: "TODO"
|
||||
target:
|
||||
# - deb
|
||||
- zip
|
||||
- AppImage
|
||||
|
||||
artifactName: "${productName}-${version}-${arch}.${ext}"
|
||||
|
||||
win:
|
||||
icon: "assets/icons/TODO.ico"
|
||||
artifactName: "${productName}-${version}-setup.${ext}"
|
||||
|
||||
publish:
|
||||
provider: github
|
||||
owner: thecodingmachine
|
||||
repo: workadventure
|
||||
vPrefixedTagName: false
|
||||
releaseType: draft
|
@ -1,13 +1,15 @@
|
||||
{
|
||||
"name": "@workadventure/desktop",
|
||||
"name": "workadventure-desktop",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"main": "build/main.js",
|
||||
"license": "SEE LICENSE IN LICENSE.txt",
|
||||
"scripts": {
|
||||
"build": "tsup-node ./src/main.ts ./src/sidebar/preload.ts ./src/app/preload.js",
|
||||
"build": "tsup-node -d build ./src/main.ts ./src/sidebar/preload.ts ./src/app/preload.ts",
|
||||
"dev": "yarn build --watch --onSuccess 'yarn electron build/main.js'",
|
||||
"bundle": "electron-builder install-app-deps && electron-builder",
|
||||
"release": "yarn bundle",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"dev": "yarn build --watch --onSuccess 'yarn electron dist/main.js'",
|
||||
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
|
||||
"lint": "yarn eslint src/ . --ext .ts",
|
||||
"fix": "yarn eslint --fix src/ . --ext .ts",
|
||||
@ -35,36 +37,5 @@
|
||||
"prettier": "^2.5.1",
|
||||
"tsup": "^5.11.13",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"build": {
|
||||
"appId": "re.workadventu.desktop",
|
||||
"files": [
|
||||
"src/**/*",
|
||||
"assets/**/*"
|
||||
],
|
||||
"dmg": {
|
||||
"icon": false
|
||||
},
|
||||
"linux": {
|
||||
"category": "TODO;TODO",
|
||||
"packageCategory": "TODO;TODO",
|
||||
"maintainer": "TODO",
|
||||
"icon": "assets/icons/TODO.icns",
|
||||
"description": "TODO",
|
||||
"target": [
|
||||
"deb",
|
||||
"zip",
|
||||
"AppImage"
|
||||
],
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}"
|
||||
},
|
||||
"win": {
|
||||
"icon": "assets/icons/TODO.ico",
|
||||
"artifactName": "${productName}-${version}-setup.${ext}"
|
||||
},
|
||||
"publish": {
|
||||
"provider": "generic",
|
||||
"url": "TODO"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
"sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
"outDir": "./dist", /* Redirect output structure to the directory. */
|
||||
"outDir": "./build", /* Redirect output structure to the directory. */
|
||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
// "composite": true, /* Enable project compilation */
|
||||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||
|
Loading…
Reference in New Issue
Block a user