deps(deps-dev): bump org.junit.vintage:junit-vintage-engine from 5.14.2 to 6.0.3 #65
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/CD Pipeline | |
| on: | |
| push: | |
| branches: [ master, main, develop ] | |
| tags: [ 'v*' ] | |
| pull_request: | |
| branches: [ master, main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [11, 17, 21] | |
| browser: [chrome, firefox, edge] | |
| exclude: | |
| # Edge is not available on Linux runners | |
| - browser: edge | |
| steps: | |
| - name: Checkout code | |
| 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: Setup Chrome | |
| if: matrix.browser == 'chrome' | |
| uses: browser-actions/setup-chrome@v2 | |
| - name: Setup Firefox | |
| if: matrix.browser == 'firefox' | |
| uses: browser-actions/setup-firefox@v1 | |
| - name: Install Xvfb | |
| run: sudo apt-get install -y xvfb | |
| - name: Run tests with ${{ matrix.browser }} | |
| run: xvfb-run --auto-servernum mvn clean test -P${{ matrix.browser }} | |
| env: | |
| BROWSER_NAME: ${{ matrix.browser }} | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: test-reports-java${{ matrix.java-version }}-${{ matrix.browser }} | |
| path: | | |
| target/surefire-reports/ | |
| target/site/ | |
| build: | |
| name: Build and Package | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build project | |
| run: mvn clean compile | |
| - name: Package JAR | |
| run: mvn package -DskipTests | |
| - name: Generate Javadoc | |
| run: mvn javadoc:jar | |
| - name: Generate sources JAR | |
| run: mvn source:jar | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: build-artifacts | |
| path: target/*.jar | |
| publish-snapshot: | |
| name: Publish Snapshot On Maven Central | |
| runs-on: ubuntu-latest | |
| needs: [test, build] | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && !startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Import GPG key | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) | |
| echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV | |
| # Configure GPG for batch mode | |
| mkdir -p ~/.gnupg | |
| echo "use-agent" >> ~/.gnupg/gpg.conf | |
| echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | |
| echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
| # Test the key with passphrase | |
| echo "test" | gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback --local-user $GPG_KEY_ID --armor --detach-sig | |
| gpg --list-secret-keys --keyid-format LONG | |
| export GPG_TTY=$(tty) | |
| - name: Update version to snapshot | |
| run: | | |
| mvn versions:set -DnewVersion='${project.version}-SNAPSHOT' | |
| mvn versions:commit | |
| - name: Publish to Maven Central Snapshots | |
| run: mvn clean deploy -DskipTests | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| publish-github-packages: | |
| name: Publish to GitHub Packages | |
| runs-on: ubuntu-latest | |
| needs: [test, build] | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || !startsWith(github.ref, 'refs/tags/v')) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Import GPG key | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) | |
| echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV | |
| # Configure GPG for batch mode | |
| mkdir -p ~/.gnupg | |
| echo "use-agent" >> ~/.gnupg/gpg.conf | |
| echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | |
| echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
| # Test the key with passphrase | |
| echo "test" | gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --pinentry-mode loopback --local-user $GPG_KEY_ID --armor --detach-sig | |
| gpg --list-secret-keys --keyid-format LONG | |
| export GPG_TTY=$(tty) | |
| - name: Update version to snapshot | |
| run: | | |
| mvn versions:set -DnewVersion='${project.version}-SNAPSHOT' | |
| mvn versions:commit | |
| - name: Publish to GitHub Packages | |
| run: mvn clean install deploy -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} -Dgpg.keyname=$GPG_KEY_ID -Dgpg.passphrase="$MAVEN_GPG_PASSPHRASE" -Dgpg.pinentry-mode=loopback -Pskip-central-publishing -DskipPublishing=true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| GPG_TTY: $(tty) |