Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Pulse CLI

on:
pull_request:
branches: ["main"]
paths:
- "npm-packages/cli/**"
- ".github/workflows/build-cli.yml"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm i
working-directory: npm-packages/cli

- name: Build @pulse-editor/cli
run: npm run build
working-directory: npm-packages/cli
37 changes: 37 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Desktop

on:
pull_request:
branches: ["main"]
paths:
- "desktop/**"
- "web/**"
- ".github/workflows/build-desktop.yml"
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install web dependencies
run: npm install --workspace=web

- name: Install desktop dependencies
run: npm install --workspace=desktop

- name: Rebuild native modules
run: npm run rebuild-native --workspace=desktop

- name: Build Electron App
run: |
npm run desktop-build
65 changes: 65 additions & 0 deletions .github/workflows/build-mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Mobile

env:
ANDROID_SDK_VERSION: "35.0.0"

on:
pull_request:
branches: ["main"]
paths:
- "web/**"
- "android/**"
- ".github/workflows/build-mobile.yml"

jobs:
build:
strategy:
matrix:
target: [android]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install Android SDK build tools
run: |
sdkmanager "build-tools;${{env.ANDROID_SDK_VERSION}}"
echo "$ANDROID_SDK_ROOT/build-tools/${{env.ANDROID_SDK_VERSION}}" >> $GITHUB_PATH

- name: Get Keystore
run: |
mkdir .keystore
echo ${{ secrets.ANDROID_KEYSTORE }} | base64 --decode > android/.keystore/keystore.jks

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install web dependencies
run: npm install --workspace=web

- name: Install mobile dependencies
run: npm install --workspace=mobile

- name: Build Web App
run: npm run build

- name: Change Android Project Permission
run: chmod +x android/gradlew

- name: Sync Capacitor App
run: npx cap sync

- name: Build Capacitor App
run: npx cap build android --keystorepath .keystore/keystore.jks --keystorepass ${{ secrets.ANDROID_KEYSTORE_PASS }} --androidreleasetype APK
35 changes: 35 additions & 0 deletions .github/workflows/build-npm-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages

name: Build NPM Packages

permissions:
contents: write

on:
pull_request:
branches: ["main"]
paths:
- "npm-packages/shared-utils/**"
- "npm-packages/react-api/**"
- ".github/workflows/build-desktop.yml"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm i --workspace=npm-packages/shared-utils && npm i --workspace=npm-packages/react-api

- name: Build @pulse-editor/shared-utils
run: npm run build --workspace=npm-packages/shared-utils

- name: Build @pulse-editor/react-api
run: npm run build --workspace=npm-packages/react-api
35 changes: 35 additions & 0 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Web

on:
pull_request:
branches: ["main"]
paths:
- "web/**"
- ".github/workflows/build-web.yml"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# echo node version to the log
- name: Echo Node.js version
run: node --version

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

# echo node version to the log
- name: Echo npm version
run: npm --version

- name: Install web dependencies
run: npm install --workspace=web

- name: Build web app
run: |
npm run web-build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "v*.*.*"

jobs:
build:
release:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
Expand All @@ -19,10 +19,16 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 20

- name: Install dependencies
run: npm install
- name: Install web dependencies
run: npm install --workspace=web

- name: Install desktop dependencies
run: npm install --workspace=desktop

- name: Rebuild native modules
run: npm run rebuild-native --workspace=desktop

- name: Build Electron App
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Build Capacitor Release

env:
ANDROID_SDK_VERSION: "35.0.0"

on:
push:
tags:
- "v*.*.*"

jobs:
build:
release:
strategy:
matrix:
target: [android]
Expand All @@ -27,8 +30,8 @@ jobs:

- name: Install Android SDK build tools
run: |
sdkmanager "build-tools;34.0.0"
echo "$ANDROID_SDK_ROOT/build-tools/34.0.0" >> $GITHUB_PATH
sdkmanager "build-tools;${{env.ANDROID_SDK_VERSION}}"
echo "$ANDROID_SDK_ROOT/build-tools/${{env.ANDROID_SDK_VERSION}}" >> $GITHUB_PATH

- name: Get Keystore
run: |
Expand All @@ -38,7 +41,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 20

- name: Install dependencies
run: npm install
Expand Down
3 changes: 2 additions & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"type": "module",
"scripts": {
"dev": "electron .",
"build": "electron-forge package"
"build": "electron-forge package",
"rebuild-native": "../node_modules/.bin/electron-rebuild -v 36.1.0"
},
"dependencies": {
"electron-serve": "^2.1.1",
Expand Down
Loading