chore(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.5 to 3.5.6 #39
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: Build and Release | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| # ------------------------------------------------------------------ | |
| # Build the fat JAR once | |
| # ------------------------------------------------------------------ | |
| jar: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build JAR | |
| run: mvn -B package -DskipTests | |
| - name: Read version | |
| id: version | |
| run: echo "version=$(mvn -B help:evaluate -Dexpression=project.version -q | tail -1)" >> $GITHUB_OUTPUT | |
| - name: Upload JAR | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: jar | |
| path: target/jd-mcp-duo.jar | |
| retention-days: 1 | |
| # ------------------------------------------------------------------ | |
| # Linux x64: jlink on ubuntu-latest | |
| # ------------------------------------------------------------------ | |
| linux-x64: | |
| needs: jar | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Download JAR | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: jar | |
| path: dist/lib | |
| - name: Build runtime (jlink) | |
| run: | | |
| jlink --add-modules java.base,java.compiler,java.desktop,java.management,java.net.http,java.scripting,java.sql,jdk.zipfs,jdk.crypto.ec,jdk.unsupported \ | |
| --strip-debug --no-header-files --no-man-pages --output dist/runtime | |
| - name: Package Linux | |
| run: | | |
| DIR="jd-mcp-duo" | |
| mkdir -p "$DIR/bin" "$DIR/lib" "$DIR/runtime" | |
| cp dist/lib/jd-mcp-duo.jar "$DIR/lib/" | |
| cp -r dist/runtime/* "$DIR/runtime/" | |
| cp src/main/scripts/jd-mcp-duo "$DIR/bin/" | |
| chmod +x "$DIR/bin/jd-mcp-duo" | |
| tar -cJf "jd-mcp-duo-linux-x64.tar.xz" "$DIR" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: linux-x64 | |
| path: jd-mcp-duo-linux-x64.tar.xz | |
| retention-days: 1 | |
| # ------------------------------------------------------------------ | |
| # macOS Intel: jlink on macos-15-intel | |
| # ------------------------------------------------------------------ | |
| macos-intel: | |
| needs: jar | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Download JAR | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: jar | |
| path: dist/lib | |
| - name: Build runtime (jlink) | |
| run: | | |
| jlink --add-modules java.base,java.compiler,java.desktop,java.management,java.net.http,java.scripting,java.sql,jdk.zipfs,jdk.crypto.ec,jdk.unsupported \ | |
| --strip-debug --no-header-files --no-man-pages --output dist/runtime | |
| - name: Package macOS Intel | |
| run: | | |
| DIR="jd-mcp-duo" | |
| mkdir -p "$DIR/bin" "$DIR/lib" "$DIR/runtime" | |
| cp dist/lib/jd-mcp-duo.jar "$DIR/lib/" | |
| cp -r dist/runtime/* "$DIR/runtime/" | |
| cp src/main/scripts/jd-mcp-duo "$DIR/bin/" | |
| chmod +x "$DIR/bin/jd-mcp-duo" | |
| tar -cJf "jd-mcp-duo-macos-x64.tar.xz" "$DIR" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: macos-intel | |
| path: jd-mcp-duo-macos-x64.tar.xz | |
| retention-days: 1 | |
| # ------------------------------------------------------------------ | |
| # macOS Apple Silicon: jlink on macos-latest | |
| # ------------------------------------------------------------------ | |
| macos-arm64: | |
| needs: jar | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Download JAR | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: jar | |
| path: dist/lib | |
| - name: Build runtime (jlink) | |
| run: | | |
| jlink --add-modules java.base,java.compiler,java.desktop,java.management,java.net.http,java.scripting,java.sql,jdk.zipfs,jdk.crypto.ec,jdk.unsupported \ | |
| --strip-debug --no-header-files --no-man-pages --output dist/runtime | |
| - name: Package macOS arm64 | |
| run: | | |
| DIR="jd-mcp-duo" | |
| mkdir -p "$DIR/bin" "$DIR/lib" "$DIR/runtime" | |
| cp dist/lib/jd-mcp-duo.jar "$DIR/lib/" | |
| cp -r dist/runtime/* "$DIR/runtime/" | |
| cp src/main/scripts/jd-mcp-duo "$DIR/bin/" | |
| chmod +x "$DIR/bin/jd-mcp-duo" | |
| tar -cJf "jd-mcp-duo-macos-arm64.tar.xz" "$DIR" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: macos-arm64 | |
| path: jd-mcp-duo-macos-arm64.tar.xz | |
| retention-days: 1 | |
| # ------------------------------------------------------------------ | |
| # Windows: jlink on windows-latest | |
| # ------------------------------------------------------------------ | |
| windows-package: | |
| needs: jar | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Download JAR | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: jar | |
| path: dist/lib | |
| - name: Build Windows runtime (jlink) | |
| shell: bash | |
| run: | | |
| jlink --add-modules java.base,java.compiler,java.desktop,java.management,java.net.http,java.scripting,java.sql,jdk.zipfs,jdk.crypto.ec,jdk.unsupported \ | |
| --strip-debug --no-header-files --no-man-pages --output dist/win/runtime | |
| - name: Package Windows | |
| shell: bash | |
| run: | | |
| DIR="jd-mcp-duo" | |
| mkdir -p "$DIR/bin" "$DIR/lib" "$DIR/runtime" | |
| cp dist/lib/jd-mcp-duo.jar "$DIR/lib/" | |
| cp -r dist/win/runtime/* "$DIR/runtime/" | |
| cp src/main/scripts/jd-mcp-duo.bat "$DIR/bin/" | |
| powershell -Command "Compress-Archive -Path '$DIR' -DestinationPath 'jd-mcp-duo-windows-x64.zip'" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: windows-platform | |
| path: jd-mcp-duo-windows-x64.zip | |
| retention-days: 1 | |
| # ------------------------------------------------------------------ | |
| # GitHub Release | |
| # ------------------------------------------------------------------ | |
| release: | |
| if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') | |
| needs: [linux-x64, macos-intel, macos-arm64, windows-package] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| pattern: '{linux-x64,macos-intel,macos-arm64,windows-platform}' | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: jar | |
| - uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| jd-mcp-duo-linux-x64.tar.xz | |
| jd-mcp-duo-macos-x64.tar.xz | |
| jd-mcp-duo-macos-arm64.tar.xz | |
| jd-mcp-duo-windows-x64.zip | |
| jd-mcp-duo.jar |