Skip to content

Build Release Artifacts #82

Build Release Artifacts

Build Release Artifacts #82

Workflow file for this run

name: Build Release Artifacts
on:
workflow_dispatch:
push:
branches:
- master
jobs:
package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Get package version
uses: actions/github-script@v6
id: version
with:
script: |
return JSON.parse(require('fs').readFileSync('package.json')).version;
result-encoding: string
- name: Install Dependencies
run: npm install
- name: Install Gulp on Mac
run: npm install -g gulp
if: startsWith(matrix.os, 'mac')
- name: Build
run: gulp prep-pkg
- name: Package Win/Linux
run: npm run dist
if: startsWith(matrix.os, 'win') || startsWith(matrix.os, 'ubuntu')
- name: Package Mac
run: PYTHON_PATH=$(which python) npm run dist
if: startsWith(matrix.os, 'mac')
- name: Upload Linux Version
uses: actions/upload-artifact@v2
with:
path: ./release/INTO-CPS-Application-${{ steps.version.outputs.result }}.AppImage
name: INTO-CPS-Application-${{ steps.version.outputs.result }}-linux.AppImage
if: startsWith(matrix.os, 'ubuntu')
- name: Upload Windows Version
uses: actions/upload-artifact@v2
with:
path: ./release/INTO-CPS-Application Setup ${{ steps.version.outputs.result }}.exe
name: INTO-CPS-Application-${{ steps.version.outputs.result }}-win-setup.exe
if: startsWith(matrix.os, 'windows')
- name: Upload Portable Windows Version
uses: actions/upload-artifact@v2
with:
path: ./release/INTO-CPS-Application ${{ steps.version.outputs.result }}.exe
name: INTO-CPS-Application-${{ steps.version.outputs.result }}-win-portable.exe
if: startsWith(matrix.os, 'windows')
- name: Upload Dmg
uses: actions/upload-artifact@v2
with:
path: ./release/INTO-CPS-Application-${{ steps.version.outputs.result }}.dmg
name: INTO-CPS-Application-${{ steps.version.outputs.result }}-mac.dmg
if: startsWith(matrix.os, 'mac')
- name: Upload Darwin Zip
uses: actions/upload-artifact@v2
with:
path: ./release/INTO-CPS-Application-${{ steps.version.outputs.result }}-mac.zip
name: INTO-CPS-Application-${{ steps.version.outputs.result }}-darwin_x64.zip
if: startsWith(matrix.os, 'mac')