Skip to content

fix: use JitPack coordinate for sdk-java dependency (com.github.QTSur… #3

fix: use JitPack coordinate for sdk-java dependency (com.github.QTSur…

fix: use JitPack coordinate for sdk-java dependency (com.github.QTSur… #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build, unit tests + integration tests
run: mvn -B verify
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build fat JAR
run: mvn -B package -DskipTests
- name: Extract changelog for ${{ github.ref_name }}
id: changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
JAR=$(ls target/mcp-*.jar | grep -v 'original-' | head -1)
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes "${{ steps.changelog.outputs.notes }}" \
"$JAR#qtsurfer-mcp-java-${GITHUB_REF_NAME}.jar"