-
Notifications
You must be signed in to change notification settings - Fork 84
56 lines (48 loc) · 1.6 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
48
49
50
51
52
53
54
55
56
name: prepare-release
on:
workflow_dispatch:
inputs:
release:
description: Type of release
required: true
type: choice
options:
- PATCH
- MINOR
- MAJOR
default: PATCH
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# SSH connection with keys is necessary to allow `git push`
- name: Ensure correct SSH connection
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
cache: maven
- name: Determine new versions
run: |
echo "release_version=$(./.github/workflows/maven-version-determiner.py release-version $release_type)" >> "$GITHUB_ENV"
echo "snapshot_version=$(./.github/workflows/maven-version-determiner.py snapshot-version $release_type)" >> "$GITHUB_ENV"
echo "version_tag=$(./.github/workflows/maven-version-determiner.py version-tag $release_type)" >> "$GITHUB_ENV"
env:
release_type: ${{ inputs.release }}
- name: Configure Git user
run: |
git config user.email "actions@users.noreply.github.com"
git config user.name "GitHub Actions"
- name: Prepare with Maven release plugin
run: >
mvn
--batch-mode
-Dresume=false
-Drelease-version=$release_version
-Dtag=$version_tag
-DdevelopmentVersion=$snapshot_version
release:prepare