mirror of https://github.com/TriliumNext/Notes
Merge pull request #1507 from TriliumNext/feature/windows_signing_v3
Windows Signingpull/1520/head^2
commit
90ab31329e
@ -1,93 +0,0 @@
|
|||||||
name: Main
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "feature/update**"
|
|
||||||
- "feature/server_esm**"
|
|
||||||
paths-ignore:
|
|
||||||
- "docs/**"
|
|
||||||
- ".github/workflows/main-docker.yml"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
make-electron:
|
|
||||||
name: Make Electron
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
arch: [x64, arm64]
|
|
||||||
os:
|
|
||||||
- name: macos
|
|
||||||
image: macos-latest
|
|
||||||
extension: [dmg, zip]
|
|
||||||
- name: linux
|
|
||||||
image: ubuntu-latest
|
|
||||||
extension: [deb, rpm, zip, flatpak]
|
|
||||||
- name: windows
|
|
||||||
image: windows-latest
|
|
||||||
extension: [exe, zip]
|
|
||||||
runs-on: ${{ matrix.os.image }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
- name: Run the build
|
|
||||||
uses: ./.github/actions/build-electron
|
|
||||||
with:
|
|
||||||
os: ${{ matrix.os.name }}
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
extension: ${{ matrix.os.extension }}
|
|
||||||
env:
|
|
||||||
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
|
|
||||||
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
|
|
||||||
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
|
|
||||||
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
|
|
||||||
# Clean up keychain after build
|
|
||||||
- name: Clean up keychain
|
|
||||||
if: matrix.os.name == 'macos' && always()
|
|
||||||
run: |
|
|
||||||
security delete-keychain build.keychain
|
|
||||||
|
|
||||||
- name: Publish artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.zip
|
|
||||||
path: upload/*.zip
|
|
||||||
- name: Publish installer artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.${{matrix.os.extension}}
|
|
||||||
path: upload/*.${{ matrix.os.extension }}
|
|
||||||
|
|
||||||
build_linux_server:
|
|
||||||
name: Build Linux Server
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
arch: [x64, arm64]
|
|
||||||
include:
|
|
||||||
- arch: x64
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
- arch: arm64
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
runs-on: ${{ matrix.runs-on }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Run the build
|
|
||||||
uses: ./.github/actions/build-server
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNextNotes linux server ${{ matrix.arch }}
|
|
||||||
path: upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz
|
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
const child_process = require("child_process");
|
||||||
|
|
||||||
|
module.exports = function (filePath) {
|
||||||
|
const { WINDOWS_SIGN_EXECUTABLE } = process.env;
|
||||||
|
|
||||||
|
if (!WINDOWS_SIGN_EXECUTABLE) {
|
||||||
|
console.warn("[Sign] Skip signing due to missing environment variable.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${filePath}"`;
|
||||||
|
console.log(`[Sign] ${command}`);
|
||||||
|
child_process.execSync(command);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue