Skip to content

[build] Switch to ubuntu-22.04 runner (#482) #127

[build] Switch to ubuntu-22.04 runner (#482)

[build] Switch to ubuntu-22.04 runner (#482) #127

Workflow file for this run

name: Snapshot
on:
push:
branches:
- master
jobs:
checkSnapshot:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: '13' # Modern JVM is needed for Java 10+ specific tests
distribution: 'adopt'
- name: Run tests and javadoc
run: ./gradlew check javadoc
publishSnapshot:
runs-on: ubuntu-22.04
needs: checkSnapshot
environment: snapshot
env: #change this after a release
BLOCKHOUND_VERSION: 1.0.12.BUILD-SNAPSHOT
steps:
- name: check version
if: ${{ !endsWith(env.BLOCKHOUND_VERSION, '.BUILD-SNAPSHOT') }}
run: |
echo "::error ::$BLOCKHOUND_VERSION is not following the x.y.z.BUILD-SNAPSHOT format"
exit 1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: '8'
distribution: 'temurin'
- name: Publish Snapshot
run: ./gradlew --no-daemon -Pversion=$BLOCKHOUND_VERSION publish
env:
GRADLE_PUBLISH_REPO_URL: https://repo.spring.io/libs-snapshot-local/
GRADLE_PUBLISH_MAVEN_USER: ${{secrets.ARTIFACTORY_USERNAME}}
GRADLE_PUBLISH_MAVEN_PASSWORD: ${{secrets.ARTIFACTORY_PASSWORD}}