chore: bump version to 0.6.0 #140
Workflow file for this run
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: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| echo "tag=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building release for $VERSION" | |
| - name: Check if release already exists | |
| id: check_release | |
| run: | | |
| VERSION="${{ steps.version.outputs.tag }}" | |
| if gh release view "$VERSION" >/dev/null 2>&1; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| echo "Release $VERSION already exists, skipping..." | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "Release $VERSION does not exist, proceeding..." | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate release notes | |
| if: steps.check_release.outputs.exists == 'false' | |
| run: | | |
| VERSION="${{ steps.version.outputs.tag }}" | |
| VERSION_NO_V=${VERSION#v} | |
| # Find previous tag | |
| PREVIOUS_TAG=$(git tag -l 'v*' --sort=-version:refname | grep -v "^${VERSION}$" | head -n 1) | |
| if [ -z "$PREVIOUS_TAG" ]; then | |
| PREVIOUS_TAG="" | |
| fi | |
| # Get commits since previous tag | |
| if [ -z "$PREVIOUS_TAG" ]; then | |
| COMMIT_COUNT=$(git rev-list --count HEAD) | |
| if [ "$COMMIT_COUNT" -gt 20 ]; then | |
| COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges HEAD~20..HEAD) | |
| else | |
| COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges) | |
| fi | |
| else | |
| COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges "$PREVIOUS_TAG"..HEAD) | |
| fi | |
| cat > release_notes.md << NOTES_EOF | |
| ## Install | |
| \`\`\`bash | |
| uv tool install specify-cli --from git+https://github.com/github/spec-kit.git@${VERSION} | |
| specify init my-project | |
| \`\`\` | |
| NOTES_EOF | |
| echo "## What's Changed" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "$COMMITS" >> release_notes.md | |
| - name: Create GitHub Release | |
| if: steps.check_release.outputs.exists == 'false' | |
| run: | | |
| VERSION="${{ steps.version.outputs.tag }}" | |
| VERSION_NO_V=${VERSION#v} | |
| gh release create "$VERSION" \ | |
| --title "Spec Kit - $VERSION_NO_V" \ | |
| --notes-file release_notes.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |