3636 python-version : ${{ env.PYTHON_VERSION }}
3737
3838 - name : Verify version
39- uses : home-assistant/actions/helpers/verify-version@ab22029681aa532bfe7de5774a9972d67bfbd2c0 # master
39+ uses : home-assistant/actions/helpers/verify-version@a7c616ce81ccda50150bf1595786c71b1883fabb # master
4040
4141 - name : Setup Node and install
4242 uses : ./.github/actions/setup
@@ -48,15 +48,44 @@ jobs:
4848 run : ./script/translations_download
4949 env :
5050 LOKALISE_TOKEN : ${{ secrets.LOKALISE_TOKEN }}
51+ # The app fetches core (backend) translations live from HA, so the
52+ # release build does not need Lokalise's backend project.
53+ SKIP_BACKEND_TRANSLATIONS : " 1"
54+
55+ # Restore the content-addressed compression cache. Unchanged chunks and
56+ # static assets are then reused instead of re-run through brotli/zopfli.
57+ - name : Restore compression cache
58+ id : compress-cache
59+ continue-on-error : true
60+ uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
61+ with :
62+ path : .compress-cache
63+ key : compress-cache-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
64+ restore-keys : |
65+ compress-cache-${{ runner.os }}-
5166
5267 - name : Build and release package
68+ env :
69+ COMPRESS_CACHE_DIR : ${{ github.workspace }}/.compress-cache
5370 run : |
5471 python3 -m pip install build
5572 export SKIP_FETCH_NIGHTLY_TRANSLATIONS=1
5673 script/release
5774
75+ # The build keeps the cache under its size budget, so saving stays bounded.
76+ # A unique key always writes; restore-keys picks the newest on the next
77+ # run. Not gated on the restore step: a transient restore failure (it is
78+ # continue-on-error) must not stop us persisting a freshly built cache.
79+ - name : Save compression cache
80+ if : success()
81+ continue-on-error : true
82+ uses : actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
83+ with :
84+ path : .compress-cache
85+ key : compress-cache-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
86+
5887 - name : Publish to PyPI
59- uses : pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
88+ uses : pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
6089 with :
6190 skip-existing : true
6291
@@ -125,6 +154,8 @@ jobs:
125154 run : ./script/translations_download
126155 env :
127156 LOKALISE_TOKEN : ${{ secrets.LOKALISE_TOKEN }}
157+ # The landing-page build does not merge backend translations.
158+ SKIP_BACKEND_TRANSLATIONS : " 1"
128159 - name : Build landing-page
129160 run : landing-page/script/build_landing_page
130161 - name : Tar folder
0 commit comments