Skip to content

Commit a0dde8c

Browse files
committed
Add gradle-release.yml workflow
1 parent dfaca6c commit a0dde8c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Gradle Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]*.[0-9]*.[0-9]*" # pattern for v1.2.3
7+
- "v[0-9]*.[0-9]*.[0-9]*-*" # pattern for v1.2.3-suffix
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v5
19+
with:
20+
java-version: "17"
21+
distribution: "temurin"
22+
23+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
24+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
28+
- name: Publish with Gradle Wrapper
29+
env:
30+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
31+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
32+
PUBLISHING_USERNAME: ${{ secrets.PUBLISHING_USERNAME }}
33+
PUBLISHING_PASSWORD: ${{ secrets.PUBLISHING_PASSWORD }}
34+
run: |
35+
VERSION="${GITHUB_REF_NAME#v}" # removes leading 'v' from tag name
36+
echo "Publishing version $VERSION"
37+
./gradlew -Pversion="$VERSION" -Psign publishAggregationToCentralPortal

0 commit comments

Comments
 (0)