-
Notifications
You must be signed in to change notification settings - Fork 64
46 lines (36 loc) · 1.31 KB
/
deploy.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
44
45
46
name: Deploy
on:
push:
tags:
- '*.*.*'
jobs:
deploy:
runs-on: macos-latest
env:
SONA_USER: ${{ secrets.SONA_USER }}
SONA_PASS: ${{ secrets.SONA_PASS }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONA_PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONA_PGP_SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build
run: ./gradlew assembleRelease
- name: Get tag and tracker version information
id: version
run: |
echo ::set-output name=TAG_VERSION::${GITHUB_REF#refs/*/}
echo "##[set-output name=TRACKER_VERSION;]$(cat VERSION)"
- name: Fail if version mismatch
if: ${{ steps.version.outputs.TAG_VERSION != steps.version.outputs.TRACKER_VERSION }}
run: |
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project (${{ steps.version.outputs.TRACKER_VERSION }})"
exit 1
- name: Publish
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository