-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.24 KB
/
validate-pr.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
name: Validate PR
on:
pull_request:
branches:
- 'master'
jobs:
build_project:
runs-on: macos-latest
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{secrets.SONATYPE_NEXUS_USERNAME}}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{secrets.SONATYPE_NEXUS_PASSWORD}}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{secrets.SIGNING_SECRET_KEY_RING}}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{secrets.SIGNING_KEY_ID}}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{secrets.SIGNING_PASSWORD}}
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
fetch-tags: true
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set version
run: |
VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
major=$(echo $VERSION | cut -d'.' -f1)
minor=$(echo $VERSION | cut -d'.' -f2)
fix=$(echo $VERSION | cut -d'.' -f3)
echo "LIBRARY_VERSION=$major.$minor.$(($fix + 1))-SNAPSHOT-BUILD-${{ github.run_id }}" >> "$GITHUB_ENV"
- name: Build
run: |
./gradlew buildAndPublish --no-daemon