-
Notifications
You must be signed in to change notification settings - Fork 37
62 lines (52 loc) · 1.8 KB
/
create-release.yml
File metadata and controls
62 lines (52 loc) · 1.8 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
52
53
54
55
56
57
58
59
60
61
62
name: Create release branch and tag
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Default version to use when preparing a release."
required: true
default: "X.Y"
developmentVersion:
description: "Default version to use for new local working copy."
required: true
default: "X.Y-SNAPSHOT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
DEVELOPMENT_VERSION: ${{ github.event.inputs.developmentVersion }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Switch git branch
run: git switch -c release-${{ env.RELEASE_VERSION }}
- name: Install Node
uses: actions/setup-node@v6
with:
node-version: "20.x"
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 17
java-package: jdk
distribution: temurin
cache: 'maven'
- name: Configure git
run: |
git config committer.email "infra@finos.org"
git config committer.name "FINOS Admin"
git config author.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config author.name "${GITHUB_ACTOR}"
- name: Setup SSH Access for Commit
uses: kielabokkie/ssh-key-and-known-hosts-action@v1.5.0
with:
ssh-private-key: ${{ secrets.COMMIT_SSH_PRIVATE_KEY }}
ssh-host: github.com
- name: Make mvnw executable
run: chmod +x mvnw
- name: Maven create release branch and tag
run: ./mvnw -B -ntp release:prepare -DreleaseVersion=${{ env.RELEASE_VERSION }} -DdevelopmentVersion=${{ env.DEVELOPMENT_VERSION }}