Skip to content

Commit

Permalink
Merge pull request #5 from selfcustody/linux-appimage-wdio
Browse files Browse the repository at this point in the history
Linux appimage wdio
  • Loading branch information
qlrd authored Jun 14, 2023
2 parents 9204597 + 1a7c6ba commit 207a241
Show file tree
Hide file tree
Showing 194 changed files with 16,613 additions and 1,811 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/build-linux-appimage.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build electron application on linux

on:
workflow_call:
secrets:
token:
required: true

inputs:
build:
description: 'The build type (AppImage, flatpak, snap, deb, rpm, pacman)'
type: string
required: true

digest-ext:
description: 'The extension for sha256 digest file'
type: string
default: 'sha256.txt'


jobs:

build-linux:
runs-on: ubuntu-latest

steps:

- name: Checkout Git repository
uses: actions/checkout@v3

- name: Setup cached node.js with dependencies
uses: qlrd/setup-cached-node@main
with:
node-version: '18.15.0'
cache-path: ${{ github.workspace }}/node_modules
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Variables helpers
id: setup
run: |
export KRUX_VERSION=`node -e "console.log(require('./package.json').version)"`
export KRUX_NAME="KruxInstaller-$KRUX_VERSION" >> $GITHUB_OUTPUT
echo "app-name=$KRUX_NAME" >> $GITHUB_OUTPUT
- name: Restore cache build
id: restore-cache-build
uses: actions/cache/restore@v3
with:
path: |
dist_electron/${{ steps.setup.outputs.app-name }}.${{ inputs.build }}
dist_electron/${{ steps.setup.outputs.app-name }}.${{ inputs.build }}.${{ inputs.digest-ext }}
dist_electron/linux-unpacked
key: ${{ runner.os }}-build-${{ hashFiles('src/**', 'public/**', 'vue.config.js') }}

- name: Build electron app
if: ${{ steps.restore-cache-build.outputs.cache-hit != 'true' }}
shell: bash
env:
GH_TOKEN: ${{ secrets.token }}
run: yarn run build ${{ inputs.build }}

- name: Hash electron app (Linux)
if: ${{ steps.restore-cache-build.outputs.cache-hig != 'true' }}
uses: qlrd/sha256sum-action@v2
with:
working-directory: ./dist_electron
file: ${{ steps.setup.outputs.app-name }}.${{ inputs.build }}
ext: ${{ inputs.digest-ext }}

- name: List dist_electron files
run: ls -la dist_electron

- name: List dist_electron/linux-unpacked files
run: ls -la dist_electron/linux-unpacked

- name: Save cache build
if: ${{ steps.restore-cache-build.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v3
with:
path: |
dist_electron/${{ steps.setup.outputs.app-name }}.${{ inputs.build }}
dist_electron/${{ steps.setup.outputs.app-name }}.${{ inputs.build }}.${{ inputs.digest-ext }}
dist_electron/linux-unpacked
key: ${{ runner.os }}-build-${{ hashFiles('src/**', 'public/**', 'vue.config.js') }}
105 changes: 0 additions & 105 deletions .github/workflows/build-win-nsis-installer.yml

This file was deleted.

Loading

0 comments on commit 207a241

Please sign in to comment.