forked from DBuit/custom-sonos-card
-
-
Notifications
You must be signed in to change notification settings - Fork 23
50 lines (43 loc) · 1.29 KB
/
release.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
name: Release
on:
push:
tags:
- '*'
jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
failOnError: true
commitMode: true
configuration: ".release-notes-config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{steps.build_changelog.outputs.changelog}}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build
- name: Build the file
run: |
cd /home/runner/work/custom-sonos-card/custom-sonos-card
npm install
npm run build
- name: Upload to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/custom-sonos-card/custom-sonos-card/dist/custom-sonos-card.js
asset_name: custom-sonos-card.js
tag: ${{ github.ref }}
overwrite: true