72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
name: Nightly
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 1 * * *"
|
|
|
|
env:
|
|
PYTHON_VERSION: "3.12"
|
|
NODE_OPTIONS: --max_old_space_size=6144
|
|
|
|
permissions:
|
|
actions: none
|
|
|
|
jobs:
|
|
nightly:
|
|
name: Nightly
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4.1.0
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: yarn
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Download translations
|
|
run: ./script/translations_download
|
|
env:
|
|
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
|
|
|
- name: Bump version
|
|
run: script/version_bump.js nightly
|
|
|
|
- name: Build nightly Python wheels
|
|
run: |
|
|
pip install build
|
|
yarn install
|
|
export SKIP_FETCH_NIGHTLY_TRANSLATIONS=1
|
|
script/build_frontend
|
|
rm -rf dist home_assistant_frontend.egg-info
|
|
python3 -m build
|
|
|
|
- name: Archive translations
|
|
run: tar -czvf translations.tar.gz translations
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4.5.0
|
|
with:
|
|
name: wheels
|
|
path: dist/home_assistant_frontend*.whl
|
|
if-no-files-found: error
|
|
|
|
- name: Upload translations
|
|
uses: actions/upload-artifact@v4.5.0
|
|
with:
|
|
name: translations
|
|
path: translations.tar.gz
|
|
if-no-files-found: error
|