forked from webosbrew/webos-homebrew-channel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: merge build steps into reusable workflow
- Loading branch information
1 parent
c129d98
commit 4418f8c
Showing
3 changed files
with
75 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 'Build IPK and manifest' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
fail-on-lint-error: | ||
description: 'Fail on lint error' | ||
required: false | ||
default: false | ||
type: boolean | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
continue-on-error: ${{ github.event_name != 'workflow_call' || inputs.fail-on-lint-error }} | ||
|
||
- name: Build frontend | ||
run: npm run build -- --production | ||
|
||
- name: Build service | ||
run: npm run build-service -- --env production | ||
|
||
- name: Create IPK | ||
run: npm run package | ||
|
||
- name: Create manifest | ||
run: npm run manifest | ||
|
||
- name: Upload IPK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: hbchannel-ipk | ||
path: '*.ipk' | ||
if-no-files-found: error | ||
|
||
- name: Upload manifest | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: hbchannel-manifest | ||
path: '*.manifest.json' | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters