Skip to content

update support for Linux installers (#1731) #227

update support for Linux installers (#1731)

update support for Linux installers (#1731) #227

Workflow file for this run

name: Build and publish installer artifacts for all platforms
on:
push:
branches:
- 'develop'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
create_draft_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: read version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: check for existing release
run: gh release list --exclude-drafts | grep -q ".*v${{ steps.package-version.outputs.current-version }}" && exit 1 || true
- name: remove old draft releases
run: gh release list | grep -e "Draft.*v${{ steps.package-version.outputs.current-version }}" | awk '{print $3}' | xargs -r gh release delete
- name: create new draft release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: v${{ steps.package-version.outputs.current-version }}
prerelease: false
draft: true
title: ${{ steps.package-version.outputs.current-version }}
build_release:
needs: [create_draft_release]
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04-arm
include:
- os: macos-13
cert_key: APPLE_DEVELOPER_SIGNING_CERTIFICATE
cert_password_key: APPLE_CERTIFICATE_PASSWORD
apple_id_key: APPLE_ID
apple_app_specific_password_key: APPLE_ID_PASSWORD
apple_team_id_key: APPLE_TEAM_ID
- os: windows-latest
cert_key: WINDOWS_CSC_CERTIFICATE
cert_password_key: WINDOWS_CSC_PASSWORD
runs-on: ${{ matrix.os }}
env:
CSC_LINK: ${{ secrets[matrix.cert_key] }}
CSC_KEY_PASSWORD: ${{ secrets[matrix.cert_password_key] }}
APPLE_ID: ${{ secrets[matrix.apple_id_key] }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets[matrix.apple_app_specific_password_key] }}
APPLE_TEAM_ID: ${{ secrets[matrix.apple_team_id_key] }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.12.1
cache: 'npm'
- name: install Linux dev tools
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update -y
sudo apt install -y libudev-dev
- name: install Macos dev tools
if: startsWith(matrix.os, 'macos')
run: |
sudo -H pip install setuptools
- name: create NPM config file
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ./.npmrc
- run: npm run setup:ci
- run: npm run compile
- run: npm run test:unit:main -- --testTimeout=5000 --verbose --detectOpenHandles --forceExit
- run: npm run test:unit:components
- run: npm run bundle
- name: Sleep for 4 seconds
shell: bash
run: sleep 4
- name: Publish
if: ${{ startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, 'arm') }}
run: npm run publish:linux:arm64
- name: Publish
if: ${{ !startsWith(matrix.os, 'ubuntu') || !endsWith(matrix.os, 'arm') }}
run: npm run publish