Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github Workflows #926

Merged
merged 21 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Require Review from the Wayland team
* @NordicSemiconductor/wayland
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

name: Prepare nRF Connect for Desktop build

on:
workflow_call:
inputs:
runner:
required: true
type: string # [Windows, macOS, Linux]

jobs:
build:
runs-on: ["${{ inputs.runner }}"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install Dependencies
run: npm ci
- name: Run all checks
run: npm run check
- name: Run Tests
run: npm test
- name: Build for Production
run: npm run build:prod

- name: Run Electron Builder (Windows)
if: runner.os == 'Windows'
run: npx electron-builder -p never --windows nsis:x64
- name: Run Electron Builder (macOS)
if: runner.os == 'macOS'
run: npx electron-builder -p never --x64
- name: Run Electron Builder (Linux)
if: runner.os == 'Linux'
run: npx electron-builder -p never

- name: Publish built artifact
uses: actions/upload-artifact@v3
with:
name: nRF Connect for Desktop
path: "release/nrfconnect*"
retention-days: 7
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build nRF Connect for Desktop

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build_on_windows:
uses: ./.github/workflows/build.yml
with:
runner: windows-latest
build_on_ubuntu:
uses: ./.github/workflows/build.yml
with:
runner: ubuntu-latest

# build_on_mac_intel:
# uses: ./.github/workflows/build.yml
# with:
# runner: macos-latest
# build_on_mac_apple_silicon:
# uses: ./.github/workflows/build.yml
# with:
# runner: macos-latest-xlarge
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: GitHub Release of nRF Connect for Desktop

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be used (e.g. v2.1.3)'
required: true
type: string
prerelease:
description: 'Make the release a pre-release'
required: true
default: true
type: boolean
draft:
description: 'Create draft release'
required: true
default: true
type: boolean

jobs:
release:
runs-on: ['ubuntu-latest']
steps:
- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: false
artifacts: 'release/*'
commit: ${{ inputs.tag }}
prerelease: ${{ inputs.prerelease }}
draft: ${{ inputs.draft }}