Skip to content

Upgrade prettier and husky, replace pretty-quick with lint-staged #28

Upgrade prettier and husky, replace pretty-quick with lint-staged

Upgrade prettier and husky, replace pretty-quick with lint-staged #28

Workflow file for this run

on: push
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: actions/setup-node@v4
- name: Install zip
uses: montudor/action-zip@v1
- name: Dependencies
run: npm ci
- name: Build for Chrome
run: npm run build:chrome
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Build for Firefox
run: npm run build:firefox
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Zip for Chrome
if: startsWith(github.ref, 'refs/tags/')
run: zip -q -r ../../home-assistant-chrome.zip *
working-directory: dist/chrome
- name: Zip for Firefox
if: startsWith(github.ref, 'refs/tags/')
run: zip -q -r ../../home-assistant-firefox.zip *
working-directory: dist/firefox
- name: Upload assets
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: home-assistant-*
tag: ${{ github.ref }}
file_glob: true