feat: propose AGENTS.md improvements from trace failures (agent-strac… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Read current version | |
| id: version | |
| run: | | |
| VERSION=$(grep '^__version__' src/agent_trace/__init__.py \ | |
| | sed 's/.*"\(.*\)"/\1/') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Compute release tag | |
| id: tag | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| # Append short SHA if a tag for this exact version already exists, | |
| # so rapid merges never collide on the same tag. | |
| if git rev-parse "v${VERSION}" >/dev/null 2>&1; then | |
| SHORT_SHA=$(git rev-parse --short HEAD) | |
| TAG="v${VERSION}-${SHORT_SHA}" | |
| else | |
| TAG="v${VERSION}" | |
| fi | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Build changelog | |
| run: | | |
| LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") | |
| if [ -z "$LAST_TAG" ]; then | |
| git log --pretty=format:"- %s" HEAD | head -20 > /tmp/changelog.txt | |
| else | |
| git log "${LAST_TAG}..HEAD" --pretty=format:"- %s" > /tmp/changelog.txt | |
| fi | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TAG="${{ steps.tag.outputs.tag }}" | |
| gh release create "$TAG" \ | |
| --title "$TAG" \ | |
| --notes-file /tmp/changelog.txt \ | |
| --target "${{ github.sha }}" |