Skip to content

Commit ff62fdd

Browse files
authored
Add Github Workflows (#926)
1 parent e52fb1e commit ff62fdd

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Require Review from the Wayland team
2+
* @NordicSemiconductor/wayland

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
name: Prepare nRF Connect for Desktop build
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
runner:
8+
required: true
9+
type: string # [Windows, macOS, Linux]
10+
11+
jobs:
12+
build:
13+
runs-on: ["${{ inputs.runner }}"]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
cache: 'npm'
20+
21+
- name: Install Dependencies
22+
run: npm ci
23+
- name: Run all checks
24+
run: npm run check
25+
- name: Run Tests
26+
run: npm test
27+
- name: Build for Production
28+
run: npm run build:prod
29+
30+
- name: Run Electron Builder (Windows)
31+
if: runner.os == 'Windows'
32+
run: npx electron-builder -p never --windows nsis:x64
33+
- name: Run Electron Builder (macOS)
34+
if: runner.os == 'macOS'
35+
run: npx electron-builder -p never --x64
36+
- name: Run Electron Builder (Linux)
37+
if: runner.os == 'Linux'
38+
run: npx electron-builder -p never
39+
40+
- name: Publish built artifact
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: nRF Connect for Desktop
44+
path: "release/nrfconnect*"
45+
retention-days: 7

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build nRF Connect for Desktop
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build_on_windows:
13+
uses: ./.github/workflows/build.yml
14+
with:
15+
runner: windows-latest
16+
build_on_ubuntu:
17+
uses: ./.github/workflows/build.yml
18+
with:
19+
runner: ubuntu-latest
20+
21+
# build_on_mac_intel:
22+
# uses: ./.github/workflows/build.yml
23+
# with:
24+
# runner: macos-latest
25+
# build_on_mac_apple_silicon:
26+
# uses: ./.github/workflows/build.yml
27+
# with:
28+
# runner: macos-latest-xlarge

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: GitHub Release of nRF Connect for Desktop
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to be used (e.g. v2.1.3)'
8+
required: true
9+
type: string
10+
prerelease:
11+
description: 'Make the release a pre-release'
12+
required: true
13+
default: true
14+
type: boolean
15+
draft:
16+
description: 'Create draft release'
17+
required: true
18+
default: true
19+
type: boolean
20+
21+
jobs:
22+
release:
23+
runs-on: ['ubuntu-latest']
24+
steps:
25+
- name: Create Release
26+
uses: ncipollo/[email protected]
27+
with:
28+
allowUpdates: false
29+
artifacts: 'release/*'
30+
commit: ${{ inputs.tag }}
31+
prerelease: ${{ inputs.prerelease }}
32+
draft: ${{ inputs.draft }}
33+
34+

0 commit comments

Comments
 (0)