forked from zonkyio/embedded-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.7 KB
/
release.yml
File metadata and controls
51 lines (51 loc) · 1.7 KB
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
49
50
51
name: Release
on:
milestone:
types: [closed]
jobs:
release:
name: Release ${{ github.event.milestone.title }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: master
fetch-depth: 0
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v5
- name: Set up Git
run: |
git config user.name "Zonky Bot"
git config user.email "bot@zonky.com"
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Make Gradle wrapper executable
run: chmod +x gradlew
- name: Publish to Maven Central via Gradle
env:
RELEASE_VERSION: ${{ github.event.milestone.title }}
# Gradle signing plugin (build.gradle.kts)
MAVEN_SIGNING_KEY: ${{ secrets.SIGNING_CERT }}
MAVEN_SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASS }}
# nmcp credentials (build.gradle.kts)
USERNAME_TOKEN: ${{ secrets.MAVEN_USER }}
PASSWORD_TOKEN: ${{ secrets.MAVEN_PASS }}
# Use the milestone title as the build's version without touching gradle.properties
run: |
./gradlew \
-Pversion=$RELEASE_VERSION \
clean check publishAllPublicationsToCentralPortal \
--stacktrace
# Reproduces Maven Release Plugin’s v@{project.version} tag
- name: Tag release
if: success()
env:
RELEASE_VERSION: ${{ github.event.milestone.title }}
run: |
git tag "v$RELEASE_VERSION"
git push origin "v$RELEASE_VERSION"