forked from hazelcast/hazelcast-hibernate
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.44 KB
/
prepare-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
name: Prepare Release
on:
workflow_dispatch:
inputs:
next-version:
description: 'Override next development version (e.g. 3.0.0-SNAPSHOT). If not set then the version will be calculated by maven release plugin'
jobs:
compatibility-tests:
name: Run compatibility tests
uses: ./.github/workflows/compatibility-tests.yml
prepare-release:
runs-on: ubuntu-latest
name: Prepare release
permissions:
contents: write
needs: compatibility-tests
steps:
- uses: actions/checkout@v4
with:
ssh-key: "${{ secrets.COMMIT_KEY }}"
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Prepare release
run: |
if [ -n "${{ github.event.inputs.next-version }}" ]; then
EXTRA_ARGS=-DdevelopmentVersion=${{ github.event.inputs.next-version }}
fi
git config user.name "GitHub Actions Bot"
git config user.email "<>"
./mvnw --batch-mode release:prepare -Prelease -Darguments="-DskipTests" $EXTRA_ARGS
./mvnw --batch-mode release:clean
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Push changes
run: |
git push
git push --tags