Skip to content

Build desktop app & publish it to github release #35

Build desktop app & publish it to github release

Build desktop app & publish it to github release #35

name: Build desktop app & publish it to github release
on:
workflow_dispatch:
# push:
# tags:
# - v*
jobs:
publish:
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
permissions:
contents: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Build for supported platforms
# https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
# 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
os: [ubuntu-latest, windows-latest]
arch: [x64]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
# Windows: Create dev cert for .appx package
- name: Create dev cert
run: |
$cert = New-SelfSignedCertificate -Subject "CN=9FB02A40-50B6-49F9-92D4-AA9DC9AC1AAB" -TextExtension "2.5.29.37={text}1.3.6.1.5.5.7.3.3" -CertStoreLocation cert:\CurrentUser\My
$pwd = ConvertTo-SecureString -String "password" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath apps/desktop/assets/appx/cert.pfx -Password $pwd
if: ${{ matrix.os == 'windows-latest' }}
- name: Install
run: npm ci
- name: build
run: npm -w @pikatorrent/desktop run make