Skip to content

Commit 4c239e1

Browse files
authored
feat: add multi architecture electron builds (#185)
Closes #162 Closes #163 Closes #164
1 parent a413e38 commit 4c239e1

5 files changed

+24
-6
lines changed

.github/workflows/docker-build-and-publish.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ jobs:
5656
username: ${{ secrets.DOCKERHUB_USERNAME }}
5757
password: ${{ secrets.DOCKERHUB_TOKEN }}
5858

59-
- name: Extract release tag
60-
id: get_tag
61-
run: echo "RELEASE_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV
59+
- name: Set output tag to github env
60+
run: echo "RELEASE_TAG=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_ENV
6261

6362
- name: Build and push Docker image api
6463
uses: docker/build-push-action@v5

.github/workflows/electron-build-and-publish.yaml

+17-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,24 @@ on:
77

88
jobs:
99
build:
10-
runs-on: macos-latest
10+
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13+
os: [macos-latest, windows-latest, ubuntu-latest]
1314
node-version: [18.x]
15+
include:
16+
- os: macos-latest
17+
build-platform: mac
18+
build-arch: arm64
19+
- os: macos-latest
20+
build-platform: mac
21+
build-arch: x64
22+
- os: windows-latest
23+
build-platform: win
24+
build-arch: x64
25+
- os: ubuntu-latest
26+
build-platform: linux
27+
build-arch: x64
1428

1529
steps:
1630
- uses: actions/checkout@v3
@@ -58,6 +72,8 @@ jobs:
5872
- name: Bundle and Publish electron
5973
run: |
6074
cd webapp
75+
export BUILD_PLATFORM=${{ matrix.build-platform }}
76+
export BUILD_ARCH=${{ matrix.build-arch }}
6177
npm run bundle-electron
6278
env:
6379
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}

.github/workflows/workflow-build.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
with:
3232
node-version: ${{ matrix.node-version }}
3333

34+
- name: Set output release tag
35+
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
36+
3437
- name: npm install webapp
3538
run: |
3639
cd webapp

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rocketnotes",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "AI-powered markdown editor - leverage vector embeddings and LLMs with your personal notes - 100% local or in the cloud",
55
"scripts": {
66
"install": "cd webapp && npm install",

webapp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "npm run config-prod && ng build --configuration production",
1313
"build-local": "export API_URL='http://localhost:3002' && npm run config-dev && ng build",
1414
"build-electron": "npm run config-prod && ng build --configuration production --base-href ./",
15-
"bundle-electron": "./node_modules/.bin/electron-builder --publish always --mac --arm64",
15+
"bundle-electron": "electron-builder --publish always --$BUILD_PLATFORM --$BUILD_ARCH",
1616
"test": "ng test"
1717
},
1818
"private": true,

0 commit comments

Comments
 (0)