Skip to content

Commit

Permalink
GHA: added a CD script.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Sep 30, 2024
1 parent 5905dd8 commit d391157
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 37 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CD

on:
push:
branches: [ main ]
release:
types: [ created ]
workflow_dispatch:

jobs:
cd:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows
os: windows-latest
script: win
- name: Linux
os: ubuntu-latest
script: linux
- name: macOS (Intel)
os: macos-13
script: mac
- name: macOS (ARM)
os: macos-latest
script: mac
steps:
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Setup Yarn
run: npm install -g yarn
- name: Build OpenCOR
run: |
yarn
yarn build:${{ matrix.script }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ./dist/OpenCOR-*.*
51 changes: 14 additions & 37 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,22 @@
appId: ws.opencor
appId: ws.opencor.app
productName: OpenCOR
directories:
buildResources: build
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
asarUnpack:
- resources/**
win:
executableName: OpenCOR
artifactName: ${productName}-${version}-Windows.${ext}
target:
- nsis
- zip
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
artifactName: ${productName}-${version}.${ext}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: ${name}-${version}.${ext}
linux:
artifactName: ${productName}-${version}-Linux.${ext}
target:
- tar.gz
mac:
artifactName: ${productName}-${version}-macOS-${arch}.${ext}
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
appImage:
artifactName: ${name}-${version}.${ext}
npmRebuild: false
- pkg
- zip
publish:
provider: generic
url: https://example.com/auto-updates
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
url: https://opencor.ws/auto-updates

0 comments on commit d391157

Please sign in to comment.