Skip to content

Commit 8095a83

Browse files
authored
Merge pull request #39 from ClayPulse/preparing-beta-release
Update release workflows
2 parents bdbf334 + 8e6b002 commit 8095a83

File tree

17 files changed

+9970
-4748
lines changed

17 files changed

+9970
-4748
lines changed

.github/workflows/build-cli.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js 20
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm i
27+
working-directory: npm-packages/cli
28+
29+
- name: Build @pulse-editor/cli
30+
run: npm run build
31+
working-directory: npm-packages/cli
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build Desktop
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "desktop/**"
8+
- "web/**"
9+
- ".github/workflows/build-desktop.yml"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
os: [windows-latest, ubuntu-latest, macos-latest]
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
30+
- name: Install shared-utils dependencies
31+
run: npm install --workspace=npm-packages/shared-utils
32+
33+
- name: Build shared-utils
34+
run: npm run shared-utils-build
35+
36+
- name: Install capacitor-plugin dependencies
37+
run: npm install --workspace=capacitor-plugin
38+
39+
- name: Build capacitor-plugin
40+
run: npm run capacitor-plugin-build
41+
42+
- name: Install web dependencies
43+
run: npm install --workspace=web
44+
45+
- name: Install desktop dependencies
46+
run: npm install
47+
working-directory: desktop
48+
49+
- name: Rebuild native modules
50+
run: npm run rebuild-native
51+
working-directory: desktop
52+
53+
- name: Build Electron App
54+
run: |
55+
npm run desktop-build

.github/workflows/build-mobile.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build Mobile
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+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build:
19+
strategy:
20+
matrix:
21+
target: [android]
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up JDK 21
29+
uses: actions/setup-java@v3
30+
with:
31+
java-version: "21"
32+
distribution: "temurin"
33+
34+
- name: Setup Android SDK
35+
uses: android-actions/setup-android@v3
36+
37+
- name: Install Android SDK build tools
38+
run: |
39+
sdkmanager "build-tools;${{env.ANDROID_SDK_VERSION}}"
40+
echo "$ANDROID_SDK_ROOT/build-tools/${{env.ANDROID_SDK_VERSION}}" >> $GITHUB_PATH
41+
42+
- name: Get Keystore
43+
run: |
44+
mkdir ~/.keystore
45+
echo ${{ secrets.ANDROID_KEYSTORE }} | base64 --decode > ~/.keystore/keystore.jks
46+
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
52+
- name: Install shared-utils dependencies
53+
run: npm install --workspace=npm-packages/shared-utils
54+
55+
- name: Build shared-utils
56+
run: npm run shared-utils-build
57+
58+
- name: Install capacitor-plugin dependencies
59+
run: npm install --workspace=capacitor-plugin
60+
61+
- name: Build capacitor-plugin
62+
run: npm run capacitor-plugin-build
63+
64+
- name: Install web dependencies
65+
run: npm install --workspace=web
66+
67+
- name: Build Web App
68+
run: npm run web-build
69+
70+
- name: Install mobile dependencies
71+
run: npm install --workspace=mobile
72+
73+
- name: Change Android Project Permission
74+
run: chmod +x mobile/android/gradlew
75+
76+
- name: Sync Capacitor App
77+
run: npx cap sync
78+
working-directory: mobile
79+
80+
- name: Build Capacitor App
81+
run: npx cap build android --keystorepath ~/.keystore/keystore.jks --keystorepass ${{ secrets.ANDROID_KEYSTORE_PASS }} --androidreleasetype APK
82+
working-directory: mobile
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 Packages
4+
5+
on:
6+
pull_request:
7+
branches: ["main"]
8+
paths:
9+
- "npm-packages/shared-utils/**"
10+
- "npm-packages/react-api/**"
11+
- ".github/workflows/build-desktop.yml"
12+
13+
permissions:
14+
contents: read
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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Web
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "web/**"
8+
- ".github/workflows/build-web.yml"
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install shared-utils dependencies
26+
run: npm install --workspace=npm-packages/shared-utils
27+
28+
- name: Build shared-utils
29+
run: npm run shared-utils-build
30+
31+
- name: Install capacitor-plugin dependencies
32+
run: npm install --workspace=capacitor-plugin
33+
34+
- name: Build capacitor-plugin
35+
run: npm run capacitor-plugin-build
36+
37+
- name: Install web dependencies
38+
run: npm install --workspace=web
39+
40+
- name: Build web app
41+
run: |
42+
npm run web-build

.github/workflows/release-capacitor.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

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

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ on:
55
tags:
66
- "v*.*.*"
77

8+
permissions:
9+
contents: write
10+
811
jobs:
9-
build:
12+
release:
1013
strategy:
1114
matrix:
1215
os: [windows-latest, ubuntu-latest, macos-latest]
@@ -19,10 +22,30 @@ jobs:
1922
- name: Setup Node.js
2023
uses: actions/setup-node@v4
2124
with:
22-
node-version: 20.x
25+
node-version: 20
26+
27+
- name: Install shared-utils dependencies
28+
run: npm install --workspace=npm-packages/shared-utils
29+
30+
- name: Build shared-utils
31+
run: npm run shared-utils-build
32+
33+
- name: Install capacitor-plugin dependencies
34+
run: npm install --workspace=capacitor-plugin
2335

24-
- name: Install dependencies
36+
- name: Build capacitor-plugin
37+
run: npm run capacitor-plugin-build
38+
39+
- name: Install web dependencies
40+
run: npm install --workspace=web
41+
42+
- name: Install desktop dependencies
2543
run: npm install
44+
working-directory: desktop
45+
46+
- name: Rebuild native modules
47+
run: npm run rebuild-native
48+
working-directory: desktop
2649

2750
- name: Build Electron App
2851
run: |

0 commit comments

Comments
 (0)