-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.71 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
57
58
name: Prepare release
run-name: Prepare release ${{ inputs.version }} on ${{ github.sha }} by @${{ github.actor }}
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
type: string
description: 'Release version'
required: false
next:
type: string
description: 'Next development version'
required: false
env:
RELEASE_VERSION: ${{ inputs.version }}
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.CONDUKTORBOT_REPO_WRITE }}
- name: Setup GPG
id: gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.CONDUKTOR_BOT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "github", "username": "conduktorbot", "password": "${{ secrets.CONDUKTORBOT_GHCR_RW }}" }]'
githubServer: false
- name: Maven release prepare
id: prepare
run: |
git config user.name "${{ steps.gpg.outputs.name }}"
git config user.email "${{ steps.gpg.outputs.email }}"
mvn --batch-mode release:prepare -DreleaseVersion=${{ env.RELEASE_VERSION }} -DdevelopmentVersion=${{ inputs.next }} -Dtag=${{ env.RELEASE_VERSION }} --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.CONDUKTORBOT_REPO_WRITE }}