2023-01-03 19:46:52 +00:00
|
|
|
name: Build & Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2023-01-13 14:41:29 +00:00
|
|
|
- "*"
|
2023-01-03 19:46:52 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2023-01-05 14:26:56 +00:00
|
|
|
- os: macOS-latest
|
|
|
|
arch: arm64
|
|
|
|
- os: macOS-latest
|
|
|
|
arch: x64
|
|
|
|
- os: windows-latest
|
|
|
|
arch: x64
|
|
|
|
- os: ubuntu-latest
|
|
|
|
arch: x64
|
2023-01-03 19:46:52 +00:00
|
|
|
|
|
|
|
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 Silver Bullet
|
|
|
|
run: deno task build
|
|
|
|
- name: Create Silver Bullet 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
|
2023-01-13 14:41:29 +00:00
|
|
|
desktop/out/**/RELEASES
|
2023-01-03 19:46:52 +00:00
|
|
|
desktop/out/**/*.rpm
|
|
|
|
desktop/out/**/*.zip
|
2023-01-05 14:34:02 +00:00
|
|
|
dist/silverbullet.js
|