-
Notifications
You must be signed in to change notification settings - Fork 98
43 lines (41 loc) · 1.5 KB
/
snapshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Snapshot
on:
push:
branches:
- master
jobs:
checkSnapshot:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
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-20.04
needs: checkSnapshot
environment: snapshot
env: #change this after a release
BLOCKHOUND_VERSION: 1.0.10.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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
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}}