chore: bump version to 1.0.5 #16
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: Java SDK CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [11, 17, 21] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build with Maven | |
| run: mvn -B compile --file pom.xml | |
| - name: Run tests | |
| run: mvn -B test --file pom.xml | |
| - name: Package JAR | |
| run: mvn -B package -DskipTests --file pom.xml | |
| - name: Upload JAR artifact | |
| if: matrix.java-version == 11 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cfsolver-jar | |
| path: target/*.jar | |
| retention-days: 7 | |
| code-quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Generate Javadoc | |
| run: mvn -B javadoc:javadoc --file pom.xml | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [build, code-quality] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Extract version from pom.xml | |
| id: version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build release JAR | |
| run: mvn -B package -DskipTests --file pom.xml | |
| - name: Upload release artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cfsolver-${{ steps.version.outputs.version }} | |
| path: | | |
| target/cfsolver-*.jar | |
| !target/*-sources.jar | |
| !target/*-javadoc.jar | |
| retention-days: 90 |