mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 12:56:37 +00:00
Add nightly frontend builds (#13061)
This commit is contained in:
parent
1cc02415d3
commit
f3c7583bf7
63
.github/workflows/nightly.yaml
vendored
Normal file
63
.github/workflows/nightly.yaml
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
name: Nightly
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 1 * * *"
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTHON_VERSION: 3.8
|
||||||
|
NODE_VERSION: 14
|
||||||
|
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@v2
|
||||||
|
|
||||||
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
|
- name: Set up Node ${{ env.NODE_VERSION }}
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
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
|
||||||
|
|
||||||
|
script/build_frontend
|
||||||
|
|
||||||
|
rm -rf dist home_assistant_frontend.egg-info
|
||||||
|
python3 -m build
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: wheels
|
||||||
|
path: dist/
|
||||||
|
if-no-files-found: error
|
@ -24,10 +24,15 @@ function auto(version) {
|
|||||||
return patch(version);
|
return patch(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function nightly() {
|
||||||
|
return `${today()}.dev`;
|
||||||
|
}
|
||||||
|
|
||||||
const methods = {
|
const methods = {
|
||||||
patch,
|
patch,
|
||||||
today,
|
today,
|
||||||
auto,
|
auto,
|
||||||
|
nightly,
|
||||||
};
|
};
|
||||||
|
|
||||||
async function main(args) {
|
async function main(args) {
|
||||||
@ -57,7 +62,11 @@ async function main(args) {
|
|||||||
console.log("Current version:", version);
|
console.log("Current version:", version);
|
||||||
console.log("New version:", newVersion);
|
console.log("New version:", newVersion);
|
||||||
|
|
||||||
fs.writeFileSync("pyproject.toml", setup.replace(version, newVersion), "utf-8");
|
fs.writeFileSync(
|
||||||
|
"pyproject.toml",
|
||||||
|
setup.replace(version, newVersion),
|
||||||
|
"utf-8"
|
||||||
|
);
|
||||||
|
|
||||||
if (!commit) {
|
if (!commit) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user