forked from svix/svix-webhooks
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.44 KB
/
java-release.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
49
50
51
52
53
54
name: Java Release
on:
push:
tags:
- 'v*'
jobs:
dotnet:
name: Java Release
runs-on: ubuntu-24.04
environment: release
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Regen openapi libs
run: |
yarn
./regen_openapi.sh
- name: Restore gradle.properties
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> "$GITHUB_ENV"
{
echo "NEXUS_USERNAME=$NEXUS_USERNAME"
echo "NEXUS_PASSWORD=$NEXUS_PASSWORD"
echo "signing.gnupg.keyName=$OSSRH_GPG_KEY_NAME"
echo "signing.gnupg.passphrase=$OSSRH_GPG_SECRET_KEY_PASSWORD"
} >> ~/.gradle/gradle.properties
env:
NEXUS_USERNAME: "${{secrets.NEXUS_USERNAME}}"
NEXUS_PASSWORD: "${{secrets.NEXUS_PASSWORD}}"
OSSRH_GPG_KEY_NAME: "${{secrets.OSSRH_GPG_KEY_NAME}}"
OSSRH_GPG_SECRET_KEY_PASSWORD: "${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}"
- name: Install GPG Signing Key
run: |
echo -e "$OSSRH_GPG_SECRET_KEY" | gpg --batch --import
env:
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- name: Publish
run: |
cd java
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository