-
Notifications
You must be signed in to change notification settings - Fork 27
46 lines (40 loc) · 1.58 KB
/
maven-publish.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Maven Publish
on:
push:
branches: [ 'release' ]
workflow_dispatch:
inputs:
revision:
description: 'The version to publish for Spring Cloud 2022+ and JDK 17+'
required: true
default: '2.0.0-SNAPSHOT'
jobs:
build:
runs-on: ubuntu-latest
if: ${{ inputs.revision }}
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
cache: maven
- name: Publish package
run: mvn --batch-mode --update-snapshots -Drevision=${{ inputs.revision }} -Dgpg.skip=true -Prelease,ci clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
SIGN_KEY_ID: ${{ secrets.OSS_SIGNING_KEY_ID_LONG }}
SIGN_KEY: ${{ secrets.OSS_SIGNING_KEY }}
SIGN_KEY_PASS: ${{ secrets.OSS_SIGNING_PASSWORD }}