mirror of
https://github.com/alexhopeoconnor/bom-local-card.git
synced 2026-10-22 08:52:08 +10:00
Add production build split and HACS release workflows
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
name: Build and Upload Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Build Card (Production)
|
||||
run: |
|
||||
chmod +x run.sh
|
||||
./run.sh build npm prod
|
||||
|
||||
- name: Show dist contents (sanity check)
|
||||
run: ls -la dist || true
|
||||
|
||||
- name: Upload build to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/**
|
||||
fail_on_unmatched_files: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
name: HACS Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
validate-hacs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: HACS validation
|
||||
uses: "hacs/action@main"
|
||||
with:
|
||||
category: "plugin"
|
||||
|
||||
Reference in New Issue
Block a user