spike: migrate Option to record #901
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: ['21', '22', '23', '24', '25', '26-ea'] | |
| architecture: [ 'x64' ] | |
| fail-fast: false | |
| name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| architecture: ${{ matrix.architecture }} | |
| cache: 'maven' | |
| - name: Build with Maven | |
| run: ./mvnw -B package | |
| - name: Verify jar | |
| uses: pivovarit/verify-jar-action@v1.2.0 | |
| with: | |
| directory: 'vavr/target' | |
| java-version: '21' | |
| max-checks: 10 | |
| deploy-snapshot: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'maven' | |
| server-id: central | |
| server-username: CENTRAL_USERNAME | |
| server-password: CENTRAL_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| - name: Read project version | |
| id: version | |
| run: | | |
| VERSION="$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Deploy Snapshot | |
| if: endsWith(steps.version.outputs.version, '-SNAPSHOT') | |
| run: mvn -B --no-transfer-progress -Pmaven-central-release -DskipTests=true deploy | |
| env: | |
| CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
| CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |