Skip to content

Commit b25fd47

Browse files
committed
ci: support release maven deploy
1 parent d5fbff1 commit b25fd47

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
build-jar:
3636
name: Build Jar
3737
runs-on: ubuntu-latest
38-
needs: [ info ]
3938
steps:
4039
- uses: actions/checkout@v4
4140

@@ -64,7 +63,7 @@ jobs:
6463
uses: actions/upload-artifact@v4
6564
with:
6665
name: boot
67-
path: boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.jar
66+
path: boot/build/libs/*.jar
6867

6968
docker-push:
7069
name: Docker Push
@@ -110,6 +109,29 @@ jobs:
110109
ghcr.io/reajason/memshell-party:${{ needs.info.outputs.version-without-v }}
111110
ghcr.io/reajason/memshell-party:latest
112111
112+
deploy-maven:
113+
name: Deploy to Maven Central
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v4
117+
- name: Setup Java
118+
uses: actions/setup-java@v4
119+
with:
120+
distribution: 'temurin'
121+
java-version: 17
122+
123+
- name: Setup Gradle
124+
uses: gradle/actions/setup-gradle@v4
125+
126+
- name: Publish with Gradle
127+
env:
128+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
129+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
130+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
131+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyId }}
132+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
133+
run: ./gradlew publishAllToMavenCentral
134+
113135
create-release:
114136
name: Create Release
115137
needs: [ info, docker-push ]

0 commit comments

Comments
 (0)