This repository has been archived by the owner on May 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
102 lines (88 loc) · 3.09 KB
/
desktop.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build desktop
on:
push:
branches: [master]
paths:
- "public/**"
- "src/**"
- ".github/workflows/desktop.yaml"
- "package.json"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
build:
#runs-on: ubuntu-18.04
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Building app
run: npm run build
- name: Packaging Electron app - Windows
run: npm run package-win
env:
CSC_LINK: ${{ secrets.WIN_CERT_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_PASSWORD }}
if: matrix.os == 'windows-2019'
- name: Packaging Electron app - MacOs
run: npm run package-mac
env:
CSC_LINK: ${{ secrets.MAC_CERT_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
POLLEN_APPLE_ID: ${{ secrets.APPLE_ID }}
POLLEN_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
if: matrix.os == 'macos-10.15'
- name: Packaging Electron app - Linux
run: npm run package-linux
if: matrix.os == 'ubuntu-18.04'
- name: Import GPG key (Linux)
run: |
echo "$GPG_PRIVATE_KEY" | base64 -d > /tmp/private.key && \
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --import /tmp/private.key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
if: matrix.os == 'ubuntu-18.04'
- name: Sign AppImage (Linux)
run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key [email protected] iota-devnet-wallet-*.AppImage
working-directory: out
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
if: matrix.os == 'ubuntu-18.04'
- name: get version
id: package-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- uses: actions/upload-artifact@v2
with:
name: iota-devnet-wallet-win-${{ steps.package-version.outputs.prop}}
path: out/iota-devnet-wallet-${{ steps.package-version.outputs.prop}}.exe
if: matrix.os == 'windows-2019'
- uses: actions/upload-artifact@v2
with:
name: iota-devnet-wallet-mac-${{ steps.package-version.outputs.prop}}
path: out/iota-devnet-wallet-${{ steps.package-version.outputs.prop}}.dmg
if: matrix.os == 'macos-10.15'
- uses: actions/upload-artifact@v2
with:
name: iota-devnet-wallet-linux-${{ steps.package-version.outputs.prop}}
path: |
out/iota-devnet-wallet-${{ steps.package-version.outputs.prop}}.AppImage
if: matrix.os == 'ubuntu-18.04'