diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f589c65..839895b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,18 +4,21 @@ on: push: branches: - master - - develop pull_request: branches: - master - - develop jobs: build: name: Test build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 14 + - name: Build run: | npm install diff --git a/.github/workflows/hacs.yaml b/.github/workflows/hacs.yaml new file mode 100644 index 0000000..119add0 --- /dev/null +++ b/.github/workflows/hacs.yaml @@ -0,0 +1,17 @@ +name: Validate HACS + +on: + push: + pull_request: + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Validate HACS + uses: "hacs/action@main" + with: + category: "plugin" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12c9f73..6808bc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,22 +9,25 @@ jobs: name: Prepare release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 14 # Build - name: Build the file run: | - cd /home/runner/work/lovelace-qr-code-card/lovelace-qr-code-card npm install npm run build # Upload build file to the release as an asset. - name: Upload zip to release - uses: svenstaro/upload-release-action@v1-release + uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: /home/runner/work/lovelace-qr-code-card/lovelace-qr-code-card/dist/qr-code-card.js + file: dist/qr-code-card.js asset_name: qr-code-card.js tag: ${{ github.ref }} overwrite: true