-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathtag-release-next-dev-version.yml
More file actions
51 lines (43 loc) · 1.54 KB
/
tag-release-next-dev-version.yml
File metadata and controls
51 lines (43 loc) · 1.54 KB
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
name: Tag release and move to next development version
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
snapshotVersion:
description: "Next snapshot version"
required: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Set up git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Capture versions
run: |
echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
echo SNAPSHOT_VERSION=${{ github.event.inputs.snapshotVersion }} >> $GITHUB_ENV
- name: Tag release
run: |
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION
git commit -a -m "Release version $RELEASE_VERSION"
git tag -a v$RELEASE_VERSION -m "Release version $RELEASE_VERSION"
git push origin v$RELEASE_VERSION
- name: Move to next development version
run: |
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$SNAPSHOT_VERSION
git commit -a -m "Next development version"
git push origin main