Skip to content

Commit

Permalink
Build and Publish wifi-connect-ui
Browse files Browse the repository at this point in the history
- use custom publish action for building and publishing the ui
- update react-scripts to v5.x to be compatible with NodeJS 20.x otherwise builds
  fail with `Error: error:0308010c:digital envelope routines::unsupported [Node Error Solved]`

Change-type: patch
Signed-off-by: Rahul Thakoor <rahul@balena.io>
  • Loading branch information
rahul-thakoor committed May 24, 2024
1 parent ec9397e commit e2636cf
Show file tree
Hide file tree
Showing 3 changed files with 11,260 additions and 15,510 deletions.
49 changes: 49 additions & 0 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: package and draft GitHub release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
required: true

# --- custom environment
NODE_VERSION:
type: string
default: "20.x"

runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}

- name: Install dependencies
shell: bash
run: |
cd ./ui
if [ -e package-lock.json ]; then
npm ci
else
npm i
fi
- name: Build wifi-connect-ui
shell: bash
run: |
cd ./ui
npm run build
- name: Upload artifacts
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
name: gh-release-wifi-connect-ui-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ strategy.job-index }}
path: ./ui/build
Loading

0 comments on commit e2636cf

Please sign in to comment.