Skip to content

adds an action to test the new script works #2

adds an action to test the new script works

adds an action to test the new script works #2

name: Script testing
on:
push:
branches-ignore:
- "*-jdk11"
- "*/*-jdk11"
tags-ignore:
- "*"
jobs:
job:
name: "BULL Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Cache Maven repository"
uses: actions/cache@v4.2.3
with:
path: $HOME/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "Extract build information"
id: build_info
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
- name: "JDK set-up"
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: oss-sonatype # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
# only signed artifacts will be released to maven central. this sets up things for the maven-gpg-plugin
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
settings-path: ${{ github.workspace }}
- name: "Build and Test execution"
uses: nick-invision/retry@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SOURCE_BRANCH: ${{ steps.build_info.outputs.SOURCE_BRANCH }}
with:
max_attempts: 10
timeout_minutes: 15
retry_on: error
command: |
mvn install -P compatibility-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -q
- name: "Site build"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn site:site javadoc:aggregate -P site-release -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -q -DskipTests=true