Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
bump_type:
description: 'Version bump type'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
permissions:
contents: write
env:
GO_VERSION: "1.25"
jobs:
release:
name: Create Library Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run Tests
run: go test -v -race ./...
- name: Bump version and create tag
id: tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: ${{ github.event.inputs.bump_type }}
TAG_PREFIX: v
VERBOSE: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: steps.tag.outputs.new_tag != ''
with:
version: latest
distribution: goreleaser
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Request pkg.go.dev indexing
if: steps.tag.outputs.new_tag != ''
run: |
TAG=${{ steps.tag.outputs.new_tag }}
echo "Requesting pkg.go.dev indexing for ${TAG}..."
curl -f "https://proxy.golang.org/github.com/tuannvm/oauth-mcp-proxy/@v/${TAG}.info" || true
echo "Visit https://pkg.go.dev/github.com/tuannvm/oauth-mcp-proxy@${TAG} to view documentation"
- name: Summary
if: steps.tag.outputs.new_tag != ''
run: |
TAG=${{ steps.tag.outputs.new_tag }}
echo "### Release ${TAG} Created! 🚀" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Install:**" >> $GITHUB_STEP_SUMMARY
echo '```bash' >> $GITHUB_STEP_SUMMARY
echo "go get github.com/tuannvm/oauth-mcp-proxy@${TAG}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Documentation:**" >> $GITHUB_STEP_SUMMARY
echo "- [GitHub Release](https://github.com/tuannvm/oauth-mcp-proxy/releases/tag/${TAG})" >> $GITHUB_STEP_SUMMARY
echo "- [pkg.go.dev](https://pkg.go.dev/github.com/tuannvm/oauth-mcp-proxy@${TAG})" >> $GITHUB_STEP_SUMMARY