Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Bahoue authored Oct 20, 2023
1 parent 5c1a263 commit 007a4ce
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: WebOS build
on:
push:
pull_request:
workflow_dispatch:

jobs:
build_ipk:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Extract version from appinfo.json & GITHUB_REPOSITORY

run: |
echo "IPK_VERSION=$(jq -r .version < app/appinfo.json)" >> $GITHUB_ENV
echo "IPK_REPO"=$GITHUB_REPOSITORY >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install package tools
run: npm install -g @webosose/ares-cli @webosbrew/pub-utils

- name: Package IPK
run: ares-package app/

- name: Generate manifest for homebrew channel
env:
appinfo_path: ./app/appinfo.json
ipk_filename: ./ui30_${{ env.IPK_VERSION }}_all.ipk
icon_url: https://github.com/${{ env.IPK_REPO }}/raw/main/app/largeIcon.png
repo_url: https://github.com/${{ env.IPK_REPO }}

run: |
webosbrew-gen-manifest -a ${{ env.appinfo_path }} -p ${{ env.ipk_filename }} -i ${{ env.icon_url }} -l ${{ env.repo_url }} -o ui30.manifest.json
- name: Upload artifact & Create release
uses: actions/upload-artifact@v3
with:
name: onoff-remote_ipk
path: |
${{github.workspace}}/*.ipk
- uses: softprops/action-gh-release@v1
id: create-release
if: "github.ref == 'refs/heads/main'"
with:
token: "${{ secrets.GITHUB_TOKEN }}"

tag_name: ${{ env.IPK_VERSION }}
prerelease: false
name: ${{ env.IPK_VERSION }}
files: |
${{github.workspace}}/*.ipk
${{github.workspace}}/ui30.manifest.json

0 comments on commit 007a4ce

Please sign in to comment.