Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Build Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
tag:
|
|
required: true
|
|
type: string
|
|
ref:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
build-package:
|
|
name: Build frontend and wheel
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
ref: ${{ inputs.ref || github.sha }}
|
|
|
|
- name: Set up tools
|
|
uses: ./.github/actions/setup-tools
|
|
with:
|
|
tools: python node pnpm uv
|
|
cache-pnpm-store: true
|
|
|
|
- name: Install dependencies 👨🏻💻
|
|
run: pnpm install --prefer-offline
|
|
working-directory: "frontend"
|
|
|
|
- name: Run Build 🚚
|
|
run: pnpm generate
|
|
working-directory: "frontend"
|
|
|
|
- name: Copy the frontend into the package
|
|
run: |
|
|
rm -rf mealie/frontend
|
|
cp -a frontend/dist mealie/frontend
|
|
|
|
- name: Override __init__.py
|
|
run: |
|
|
echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py
|
|
|
|
- name: Build package and requirements files
|
|
env:
|
|
SKIP_PACKAGE_DEPS: true
|
|
run: |
|
|
mise run py:package
|
|
|
|
- name: Archive built package
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: backend-dist
|
|
path: dist
|
|
retention-days: 5
|