1
0
silverbullet/.github/workflows/desktop.yml

80 lines
2.5 KiB
YAML

name: Build & Release
on:
push:
tags:
- "*"
jobs:
build:
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macOS-latest
arch: arm64
- os: macOS-latest
arch: x64
- os: windows-latest
arch: x64
- os: ubuntu-latest
arch: x64
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3.5.1
with:
node-version: 18.x
cache: npm
cache-dependency-path: desktop/package-lock.json
- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@d4873ceeec10de6275fecd1f94b6985369d40231
with:
deno-version: v1.29.1
- name: Build SilverBullet
run: deno task build
- name: Create SilverBullet bundle
run: deno task bundle
- name: Set MacOS signing certs
if: matrix.os == 'macOS-latest'
run: chmod +x scripts/add-macos-cert.sh && ./scripts/add-macos-cert.sh
env:
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
# - name: Set Windows signing certificate
# if: matrix.os == 'windows-latest'
# continue-on-error: true
# id: write_file
# uses: timheuer/base64-to-file@v1
# with:
# fileName: 'win-certificate.pfx'
# encodedString: ${{ secrets.WINDOWS_CODESIGN_P12 }}
- name: Install npm dependencies
run: npm install
working-directory: desktop
- name: Build application
run: npm run make -- --arch=${{ matrix.arch }}
working-directory: desktop
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }}
#WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
desktop/out/**/*.deb
desktop/out/**/*Setup.exe
desktop/out/**/RELEASES
desktop/out/**/*.nupkg
desktop/out/**/*.rpm
desktop/out/**/*.zip
dist/silverbullet.js