-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (39 loc) · 1.24 KB
/
maven-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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish
on:
release:
types: [published]
env:
TAG: ${{ github.event.release.tag_name }}
jobs:
publish:
name: Publish
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant Permission to Execute Gradle
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Publish Library
run: |
echo "TAG: $TAG"
echo "Publishing library 🚀"
echo ""
./gradlew publish --no-daemon --no-parallel
echo "Published✅"
# echo "Releasing repository... 🚀"
# ./gradlew closeAndReleaseRepository
# echo "Released✅"
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}