Skip to main content
Glama
release.yml2.98 kB
name: Release on: push: tags: - 'v*.*.*' workflow_dispatch: inputs: tag: description: 'Tag to create release for (e.g., v0.1.0)' required: true type: string permissions: contents: write jobs: release: name: Create GitHub Release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 # Full history for changelog - name: Get version from tag id: version run: | if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then TAG="${{ inputs.tag }}" else TAG=${GITHUB_REF#refs/tags/} fi VERSION=${TAG#v} echo "tag=${TAG}" >> $GITHUB_OUTPUT echo "version=${VERSION}" >> $GITHUB_OUTPUT - name: Validate version matches pyproject.toml run: | PYPROJECT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') if [ "${{ steps.version.outputs.version }}" != "$PYPROJECT_VERSION" ]; then echo "Error: Tag version (${{ steps.version.outputs.version }}) does not match pyproject.toml version ($PYPROJECT_VERSION)" exit 1 fi echo "✓ Version matches: ${{ steps.version.outputs.version }}" - name: Get previous tag id: previous_tag run: | PREVIOUS_TAG=$(git tag --sort=-v:refname | grep -v "${{ steps.version.outputs.tag }}" | head -n 1) if [ -z "$PREVIOUS_TAG" ]; then PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD) fi echo "previous_tag=${PREVIOUS_TAG}" >> $GITHUB_OUTPUT echo "Previous tag/commit: ${PREVIOUS_TAG}" - name: Generate changelog id: changelog run: | echo "Generating changelog from ${{ steps.previous_tag.outputs.previous_tag }} to ${{ steps.version.outputs.tag }}" CHANGELOG=$(git log ${{ steps.previous_tag.outputs.previous_tag }}..${{ steps.version.outputs.tag }} \ --pretty=format:"- %s (%h)" \ --no-merges) if [ -z "$CHANGELOG" ]; then CHANGELOG="- Initial release" fi # Save to file for GitHub release cat > changelog.md << EOF ## Changes in ${{ steps.version.outputs.tag }} $CHANGELOG **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.previous_tag.outputs.previous_tag }}...${{ steps.version.outputs.tag }} EOF echo "Changelog generated:" cat changelog.md - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: tag_name: ${{ steps.version.outputs.tag }} name: Release ${{ steps.version.outputs.tag }} body_path: changelog.md draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrishayuk/chuk-mcp-vfs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server