Skip to content

Commit 2676b56

Browse files
committed
Update workflows
1 parent 00f18f8 commit 2676b56

File tree

7 files changed

+191
-2
lines changed

7 files changed

+191
-2
lines changed

.github/workflows/build-cli.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build Pulse CLI
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "npm-packages/cli/**"
8+
- ".github/workflows/build-cli.yml"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js 20
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Install dependencies
23+
run: npm i
24+
working-directory: npm-packages/cli
25+
26+
- name: Build @pulse-editor/cli
27+
run: npm run build
28+
working-directory: npm-packages/cli
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Electron Release
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "desktop/**"
8+
- "web/**"
9+
- ".github/workflows/build-desktop.yml"
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
os: [windows-latest, ubuntu-latest, macos-latest]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
26+
- name: Install web dependencies
27+
run: npm install --workspace=web
28+
29+
- name: Install desktop dependencies
30+
run: npm install --workspace=desktop
31+
32+
- name: Rebuild native modules
33+
run: npm run rebuild-native --workspace=desktop
34+
35+
- name: Build Electron App
36+
run: |
37+
npm run desktop-build

.github/workflows/build-mobile.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build Capacitor Release
2+
3+
env:
4+
ANDROID_SDK_VERSION: "35.0.0"
5+
6+
on:
7+
pull_request:
8+
branches: ["main"]
9+
paths:
10+
- "web/**"
11+
- "android/**"
12+
- ".github/workflows/build-mobile.yml"
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
target: [android]
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up JDK 17
26+
uses: actions/setup-java@v3
27+
with:
28+
java-version: "17"
29+
distribution: "temurin"
30+
31+
- name: Setup Android SDK
32+
uses: android-actions/setup-android@v3
33+
34+
- name: Install Android SDK build tools
35+
run: |
36+
sdkmanager "build-tools;${{env.ANDROID_SDK_VERSION}}"
37+
echo "$ANDROID_SDK_ROOT/build-tools/${{env.ANDROID_SDK_VERSION}}" >> $GITHUB_PATH
38+
39+
- name: Get Keystore
40+
run: |
41+
mkdir android/.keystore
42+
echo ${{ secrets.ANDROID_KEYSTORE }} | base64 --decode > android/.keystore/keystore.jks
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: 20
48+
49+
- name: Install dependencies
50+
run: npm install
51+
52+
- name: Build Web App
53+
run: npm run build
54+
55+
- name: Change Android Project Permission
56+
run: chmod +x android/gradlew
57+
58+
- name: Sync Capacitor App
59+
run: npx cap sync
60+
61+
- name: Build Capacitor App
62+
run: npx cap build android --keystorepath .keystore/keystore.jks --keystorepass ${{ secrets.ANDROID_KEYSTORE_PASS }} --androidreleasetype APK
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages
2+
3+
name: Build NPM Package
4+
5+
permissions:
6+
contents: write
7+
8+
on:
9+
pull_request:
10+
branches: ["main"]
11+
paths:
12+
- "npm-packages/shared-utils/**"
13+
- "npm-packages/react-api/**"
14+
- ".github/workflows/build-desktop.yml"
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js 20
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
28+
- name: Install dependencies
29+
run: npm i --workspace=npm-packages/shared-utils && npm i --workspace=npm-packages/react-api
30+
31+
- name: Build @pulse-editor/shared-utils
32+
run: npm run build --workspace=npm-packages/shared-utils
33+
34+
- name: Build @pulse-editor/react-api
35+
run: npm run build --workspace=npm-packages/react-api

.github/workflows/build-web.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Electron Release
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "web/**"
8+
- ".github/workflows/build-web.yml"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Install web dependencies
23+
run: npm install --workspace=web
24+
25+
- name: Build web app
26+
run: |
27+
npm run web-build

.github/workflows/release-electron.yml renamed to .github/workflows/release-desktop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "v*.*.*"
77

88
jobs:
9-
build:
9+
release:
1010
strategy:
1111
matrix:
1212
os: [windows-latest, ubuntu-latest, macos-latest]

.github/workflows/release-capacitor.yml renamed to .github/workflows/release-mobile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "v*.*.*"
1010

1111
jobs:
12-
build:
12+
release:
1313
strategy:
1414
matrix:
1515
target: [android]

0 commit comments

Comments
 (0)