-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 1007 Bytes
/
publish.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
name: Publish
on:
release:
types: [ released ]
jobs:
publish:
name: Release build and publish
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Fix gradle script flags
run: chmod +x gradlew
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Release build
run: ./gradlew assemble
- name: Publish to MavenCentral
run: ./gradlew publishToSonatype --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_nexusStagingProfileId: ${{ secrets.STAGING_PROFILE_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}