-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (30 loc) · 1.08 KB
/
Copy pathrelease.yml
File metadata and controls
37 lines (30 loc) · 1.08 KB
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
name: Build & Release on Tag
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Compute version from tag
id: ver
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Stamp manifest version and build HACS zip
run: |
python3 scripts/inject_manifest_version.py --version "${{ steps.ver.outputs.version }}"
mkdir -p dist
# HACS extracts the zip directly into custom_components/run_chicken,
# so the integration files must sit at the root of the archive.
(cd custom_components/run_chicken && zip -r "${GITHUB_WORKSPACE}/dist/ha-run-chicken.zip" .)
- name: List artifacts
run: ls -lah dist
- name: Create GitHub Release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
with:
generate_release_notes: true
files: dist/ha-run-chicken.zip