-
Notifications
You must be signed in to change notification settings - Fork 29
46 lines (45 loc) · 1.33 KB
/
upload_release.yaml
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
on:
push:
tags:
- '*'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
StageMC:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Grab tag name
uses: olegtarasov/get-tag@v2.1.3
id: tagName
- name: Setup Java
uses: actions/setup-java@v4.0.0
with:
distribution: temurin
java-version: 21
- name: Upload to Sonatype
run: |
./gradlew publishMavenJavaPublicationToSonatypeStagingRepository \
-Psign=true \
-PreleaseVersion="${{ steps.tagName.outputs.tag }}" \
-PsigningKey="${{ secrets.SIGNING_KEY }}" \
-PsigningPassword="${{ secrets.SIGNING_PASSWORD }}" \
-PnexusUsername="${{ secrets.NEXUS_USERNAME }}" \
-PnexusPassword="${{ secrets.NEXUS_PASSWORD }}"
ReleaseMC:
needs: [StageMC]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup Java
uses: actions/setup-java@v4.0.0
with:
distribution: temurin
java-version: 21
- name: Release to Maven Central
run: |
./gradlew closeAndReleaseRepository \
-PnexusUsername="${{ secrets.NEXUS_USERNAME }}" \
-PnexusPassword="${{ secrets.NEXUS_PASSWORD }}"