-
-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (39 loc) · 1.28 KB
/
deploy-workflow.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
name: GH deploy
on:
push:
tags:
# Matches all the tags in the format major.minor.patch (e.g. 1.12.3).
- "[0-9]+.[0-9]+.[0-9]+"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
jobs:
build:
uses: ./.github/workflows/build-jobs.yml
secrets: inherit
test:
uses: ./.github/workflows/test-jobs.yml
secrets: inherit
deploy:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Deploy
env:
DEPLOY_TAG: ${{ steps.tag-extractor.outputs.TAG }}
run: ./gradlew publishLibrary -s -PVERSION_NAME=${{github.ref_name}}