-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (77 loc) · 2.75 KB
/
release.yml
File metadata and controls
95 lines (77 loc) · 2.75 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Create Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Generate changelog
id: changelog
run: |
# Get the previous tag
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
# First release - get all commits
CHANGELOG=$(git log --oneline --no-decorate)
else
# Get commits since previous tag
CHANGELOG=$(git log --oneline --no-decorate ${PREV_TAG}..HEAD)
fi
# Format changelog
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "## Changes" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "$CHANGELOG" | while read line; do
echo "- $line" >> $GITHUB_OUTPUT
done
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
## HEDit ${{ steps.get_version.outputs.VERSION }}
${{ steps.changelog.outputs.CHANGELOG }}
---
### Installation
**PyPI (Recommended for CLI):**
```bash
pip install hedit
```
**Docker (for API server):**
```bash
docker pull ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION }}
```
**From Source:**
```bash
git clone https://github.com/${{ github.repository }}.git
cd hedit
git checkout v${{ steps.get_version.outputs.VERSION }}
pip install -e .
```
### Quick Start
```bash
# Initialize with your OpenRouter API key
hedit init --api-key YOUR_KEY
# Generate HED annotation
hedit annotate "A red circle appears on screen"
```
### Documentation
See [README.md](https://github.com/${{ github.repository }}/blob/main/README.md) for setup and usage instructions.
draft: false
prerelease: ${{ contains(steps.get_version.outputs.VERSION, 'alpha') || contains(steps.get_version.outputs.VERSION, 'beta') || contains(steps.get_version.outputs.VERSION, 'rc') }}