forked from MelleD/lovelace-expander-card
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 2.11 KB
/
release-workflow.yml
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
65
66
67
68
69
70
name: "Create Tagged Release"
on:
workflow_dispatch:
inputs:
release_version:
description: 'Version number of the release'
required: true
jobs:
gh_tagged_release:
name: Create tagged release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Setup NodeJs
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install Dependencies
run: npm install
- name: Set app version (Unix)
run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version
- name: Build Project
run: npm run build
- name: "Create Github release (full)"
if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }}
uses: softprops/action-gh-release@v2
id: expander_card_release
with:
body: "Release version ${{ github.event.inputs.release_version }}."
tag_name: ${{ github.event.inputs.release_version }}
target_commitish: "main"
draft: false
prerelease: false
files: public/expander-card.js
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Notify issues of release their fix is contained in"
uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment-template: |
Release {release_link} addresses this.