-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (46 loc) · 1.39 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (46 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build & Release on Tag
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
run: pipx install uv
- name: Build sdist & wheel (version injected via Hatch hook)
run: |
uv build
- name: Compute version from tag
id: ver
run: |
TAG="${GITHUB_REF_NAME}"
if [[ "$TAG" == v* ]]; then VERSION="${TAG:1}"; else VERSION="$TAG"; fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Create HACS zip with injected manifest
run: |
python scripts/inject_manifest_version.py --copy-dir . staging_pkg --version "${{ steps.ver.outputs.version }}"
(cd staging_pkg && zip -r "ha-run-chicken-${{ steps.ver.outputs.version }}.zip" custom_components)
mkdir -p dist
mv staging_pkg/ha-run-chicken-*.zip dist/
- name: List artifacts
run: ls -lah dist
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
files: |
dist/*.whl
dist/*.tar.gz
dist/*.zip