simplify ci and upload build artifacts

This commit is contained in:
Anton Bracke 2022-02-18 22:36:24 +01:00
parent f755f18829
commit 770e82456e
No known key found for this signature in database
GPG Key ID: B1222603899C6B25
2 changed files with 41 additions and 73 deletions

View File

@ -11,103 +11,72 @@ on:
jobs: jobs:
build_on_linux: build_on_linux:
name: "Build & release for Linux" name: "Build & release desktop app for ${{ matrix.os }}"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
runtime: [ linux-x64, win-x64, osx-x64 ]
include:
- runtime: linux-x64
os: ubuntu-latest
- runtime: osx-x64
os: macos-latest
- runtime: win-x64
os: windows-latest
runs-on: ${{ matrix.os }}
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: "actions/checkout@v2.0.0" uses: "actions/checkout@v2.0.0"
- name: "Setup NodeJS" - name: "Setup NodeJS"
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: '14.x' node-version: ${{ matrix.node-version }}
- name: "Install dependencies" - name: "Install dependencies"
run: yarn install --froze-lockfile run: yarn install --froze-lockfile
working-directory: "desktop" working-directory: "desktop"
- name: "Build Typescript" - name: "Build typescript"
run: yarn build run: yarn build
working-directory: "desktop" working-directory: "desktop"
- name: "Build App" - name: "Build app"
run: yarn bundle --publish never run: yarn bundle --publish never
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: "desktop" working-directory: "desktop"
if: ${{ github.event_name != 'release' }} if: ${{ github.event_name != 'release' }}
- name: "Build & Publish App" - name: "Build & publish App"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: "desktop" working-directory: "desktop"
if: ${{ github.event_name == 'release' }} if: ${{ github.event_name == 'release' }}
build_on_mac: - name: Upload Linux .AppImage artifact
name: "Build & release for MacOS" uses: actions/upload-artifact@v2
runs-on: macos-latest if: startsWith(matrix.os, 'linux')
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"
- name: "Setup NodeJS"
uses: actions/setup-node@v1
with: with:
node-version: '14.x' name: workadventure-desktop-linux-x64.AppImage
path: desktop/workadventure-desktop-*x86_64.AppImage
- name: "Install dependencies" - name: Upload Windows .exe artifact
run: yarn install --froze-lockfile uses: actions/upload-artifact@v2
working-directory: "desktop" if: startsWith(matrix.os, 'windows')
- name: "Build Typescript"
run: yarn build
working-directory: "desktop"
- name: "Build App"
run: yarn bundle --publish never
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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:
name: "Build & release for Windows"
runs-on: windows-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"
- name: "Setup NodeJS"
uses: actions/setup-node@v1
with: with:
node-version: '14.x' name: workadventure-desktop-win-x64.exe
path: desktop/workadventure-desktop-*.exe
- name: "Install dependencies" - name: Upload MacOS .dmg artifact
run: yarn install --froze-lockfile uses: actions/upload-artifact@v2
working-directory: "desktop" if: startsWith(matrix.os, 'macos')
with:
- name: "Build Typescript" name: workadventure-mac.dmg
run: yarn build path: desktop/workadventure-desktop-*.dmg
working-directory: "desktop"
- name: "Build App"
run: yarn bundle --publish never
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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' }}

View File

@ -16,7 +16,6 @@ linux:
description: "TODO" description: "TODO"
target: target:
# - deb # - deb
- zip
- AppImage - AppImage
artifactName: "${productName}-${version}-${arch}.${ext}" artifactName: "${productName}-${version}-${arch}.${ext}"