Skip to content

Commit e742ad2

Browse files
committed
Try to build executable and publish it
1 parent c797255 commit e742ad2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,26 @@ jobs:
5151
with:
5252
name: build_${{ inputs.runner }}
5353
path: dist/
54-
- name: 'Debug: Print Directory'
55-
run: ls -lR
54+
- name: Set the environment in order to Build for correct platform
55+
run: |
56+
if [ "${{ runner.os == 'Windows'}}" ]; then
57+
echo "$BUILD_FOR_PLATFORM=--windows nsis:x64" >> $GITHUB_ENV
58+
echo "$FILE_POSTFIX=exe"
59+
elif [ "${{ runner.os == 'macOS'}}" ]; then
60+
echo "$BUILD_FOR_PLATFORM=--x64" >> $GITHUB_ENV
61+
echo "$FILE_POSTFIX=dmg"
62+
else
63+
echo "$BUILD_FOR_PLATFORM=" >> $GITHUB_ENV
64+
echo "$FILE_POSTFIX=AppImage"
65+
fi
66+
- name: Run Electron Builder
67+
run: npx electron-builder -p never $BUILD_FOR_PLATFORM
68+
- name: Publish built artifact
69+
uses: actions/upload-artifact@v3
70+
with:
71+
name: nRF Connect for Desktop
72+
path: "release/*.$FILE_POSTFIX"
73+
retention-days: 7
5674

5775

5876

0 commit comments

Comments
 (0)