-
Notifications
You must be signed in to change notification settings - Fork 35
53 lines (49 loc) · 1.57 KB
/
deploy-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
name: Deploy Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to be released, e.g. v1.2.3, v2.2.2, v3.0.0'
required: true
jobs:
build:
runs-on: ubuntu-latest
name: Deploy release
steps:
- name: Determine tag to be released
run: |
TAG=${GITHUB_REF:10}
if [ -n "${{ github.event.inputs.tag }}" ]; then
TAG="${{ github.event.inputs.tag }}"
fi
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "VERSION=${TAG:1}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: "${{ env.TAG }}"
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
server-id: release-repository
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Deploy release
run: ./mvnw deploy -Prelease --batch-mode -DskipTests -DretryFailedDeploymentCount=3
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_OSS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
append_body: true
files: '**/target/hazelcast-hibernate*.jar'
name: "${{ env.VERSION }}"