-
Notifications
You must be signed in to change notification settings - Fork 185
77 lines (68 loc) · 2.63 KB
/
Copy pathcreate-release.yml
File metadata and controls
77 lines (68 loc) · 2.63 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Generate release notes
id: notes
run: |
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
# Extract release notes from CHANGELOG.md for this version
VERSION="${{ steps.version.outputs.VERSION }}"
# Use awk to extract the section for this version
awk -v ver="$VERSION" '
/^## \[/ {
if (found) exit
if ($0 ~ "\\[" ver "\\]") found=1
next
}
found && /^## \[/ { exit }
found { print }
' CHANGELOG.md >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "## Installation" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "### Quick Start (Recommended)" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo '```bash' >> $GITHUB_OUTPUT
echo "# Install UV package manager (if not already installed)" >> $GITHUB_OUTPUT
echo "curl -LsSf https://astral.sh/uv/install.sh | sh" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "# Install VoiceMode and configure services" >> $GITHUB_OUTPUT
echo "uvx voice-mode-install" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "# Add to Claude Code MCP" >> $GITHUB_OUTPUT
echo "claude mcp add --scope user voicemode -- uvx --refresh voice-mode" >> $GITHUB_OUTPUT
echo '```' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "### Alternative: Direct Installation" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo '```bash' >> $GITHUB_OUTPUT
echo "# With UV" >> $GITHUB_OUTPUT
echo "uv tool install voice-mode" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "# With pip" >> $GITHUB_OUTPUT
echo "pip install voice-mode==${{ steps.version.outputs.VERSION }}" >> $GITHUB_OUTPUT
echo '```' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "For detailed documentation, visit https://getvoicemode.com" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref }}
name: Release v${{ steps.version.outputs.VERSION }}
body: ${{ steps.notes.outputs.NOTES }}
draft: false
prerelease: false