20251203.1 #497
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: | |
| - published | |
| env: | |
| PYTHON_VERSION: "3.13" | |
| NODE_OPTIONS: --max_old_space_size=6144 | |
| # Set default workflow permissions | |
| # All scopes not mentioned here are set to no access | |
| # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | |
| permissions: | |
| actions: none | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to upload release assets | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Set up Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Verify version | |
| uses: home-assistant/actions/helpers/verify-version@master | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.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: Build and release package | |
| run: | | |
| python3 -m pip install twine build | |
| export TWINE_USERNAME="__token__" | |
| export TWINE_PASSWORD="${{ secrets.TWINE_TOKEN }}" | |
| export SKIP_FETCH_NIGHTLY_TRANSLATIONS=1 | |
| script/release | |
| - name: Upload release assets | |
| uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 | |
| with: | |
| files: | | |
| dist/*.whl | |
| dist/*.tar.gz | |
| wheels-init: | |
| name: Init wheels build | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate requirements.txt | |
| run: | | |
| # Sleep to give pypi time to populate the new version across mirrors | |
| sleep 240 | |
| version=$(echo "${{ github.ref }}" | awk -F"/" '{print $NF}' ) | |
| echo "home-assistant-frontend==$version" > ./requirements.txt | |
| # home-assistant/wheels doesn't support SHA pinning | |
| - name: Build wheels | |
| uses: home-assistant/[email protected] | |
| with: | |
| abi: cp313 | |
| tag: musllinux_1_2 | |
| arch: amd64 | |
| wheels-key: ${{ secrets.WHEELS_KEY }} | |
| requirements: "requirements.txt" | |
| release-landing-page: | |
| name: Release landing-page frontend | |
| if: github.event.release.prerelease == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to upload release assets | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.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: Build landing-page | |
| run: landing-page/script/build_landing_page | |
| - name: Tar folder | |
| run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist . | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 | |
| with: | |
| files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz | |
| release-supervisor: | |
| name: Release supervisor frontend | |
| if: github.event.release.prerelease == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to upload release assets | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.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: Build supervisor | |
| run: hassio/script/build_hassio | |
| - name: Tar folder | |
| run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build . | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 | |
| with: | |
| files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz |