Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chunfantasy committed Jan 19, 2024
1 parent e6aecfe commit c4619cb
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Build nRF Connect for Desktop for Darwin ARM64

on:
workflow_call:
inputs:
runner:
required: true
type: string # [Windows, macOS, Linux]
electronArgument:
required: true
type: string # e.g. --windows nsis:x64
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
- test/github-actions

jobs:
build:
runs-on: ${{ fromJSON(inputs.runner) }}
runs-on: [self-hosted, macOS, ARM64]
steps:
- uses: actions/checkout@v4
- name: Build
Expand All @@ -33,12 +33,9 @@ jobs:
APPLE_ID: ${{ secrets.WAYLAND_APPLE_ID }}
APPLE_ID_PASS: ${{ secrets.WAYLAND_APPLE_APP_SPECIFIC_PASS }}
APPLE_TEAMID: ${{ secrets.WAYLAND_APPLE_TEAMID }}
run: npx electron-builder -p never ${{ inputs.electronArgument }}
run: npx electron-builder -p never --arm64

- name: Publish built artifact
uses: actions/upload-artifact@v3
- name: Upload
uses: ./.github/actions/publish-action
with:
name:
nRF Connect for Desktop darwin${{inputs.electronArgument}}
path: 'release/nrfconnect*'
retention-days: 7
suffix: for macOS arm64
41 changes: 41 additions & 0 deletions .github/workflows/build_darwin_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build nRF Connect for Desktop for Darwin x64

on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
- test/github-actions

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build-action

- name: Fetch certificate file
env:
NORDIC_SIGNING_CERTIFICATE:
${{ secrets.NORDIC_SIGNING_CERTIFICATE_P12 }}
run:
echo "$NORDIC_SIGNING_CERTIFICATE" | base64 --decode >
./nordic_signing_certificate.p12

- name: Run Electron Builder
env:
CSC_LINK: ./nordic_signing_certificate.p12
CSC_KEY_PASSWORD: ''
APPLE_ID: ${{ secrets.WAYLAND_APPLE_ID }}
APPLE_ID_PASS: ${{ secrets.WAYLAND_APPLE_APP_SPECIFIC_PASS }}
APPLE_TEAMID: ${{ secrets.WAYLAND_APPLE_TEAMID }}
run: npx electron-builder -p never --x64

- name: Upload
uses: ./.github/actions/publish-action
with:
suffix: for macOS x64
28 changes: 13 additions & 15 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Build nRF Connect for Desktop for Darwin ARM64

on:
workflow_call:
inputs:
runner:
required: true
type: string # [Windows, macOS, Linux]
electronArgument:
required: true
type: string # e.g. --windows nsis:x64
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
- test/github-actions

jobs:
build:
runs-on: ${{ fromJSON(inputs.runner) }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
Expand All @@ -32,11 +32,9 @@ jobs:
CSC_LINK: ./nordic_signing_certificate.pfx
CSC_KEY_PASSWORD:
${{ secrets.NORDIC_SIGNING_CERTIFICATE_PFX_PASS }}
run: npx electron-builder -p never ${{ inputs.electronArgument }}
run: npx electron-builder -p never --windows nsis:x64

- name: Publish built artifact
uses: actions/upload-artifact@v3
- name: Upload
uses: ./.github/actions/publish-action
with:
name: nRF Connect for Desktop win32
path: 'release/nrfconnect*'
retention-days: 7
suffix: for Windows x64

0 comments on commit c4619cb

Please sign in to comment.