forked from AitorDB/home-assistant-sun-card
-
Notifications
You must be signed in to change notification settings - Fork 41
64 lines (52 loc) · 1.57 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build & Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-release:
name: Build & Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
- uses: rymndhng/release-on-push-action@master
id: release
with:
bump_version_scheme: norelease
use_github_release_notes: true
- name: Log Release Version
run: |
echo "Created tag name: ${{ steps.release.outputs.tag_name }}"
echo "Created release version: ${{ steps.release.outputs.version }}"
- name: Upload JS card file to release
uses: svenstaro/upload-release-action@v2
with:
overwrite: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.version }}
file: dist/lovelace-horizon-card.js