forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.45 KB
/
release-maven-prepare.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
#############################################################################
# GitHub Action to Run Prepare goal of Maven Release plugin.
#
#############################################################################
name: "R: Maven Prepare"
run-name: "R: Maven Prepare ${{ inputs.version }}"
on:
workflow_dispatch:
inputs:
version:
description: 'POM version without (-SNAPSHOT)'
required: true
workflow_call:
inputs:
version:
type: string
required: true
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
maven-prepare:
name: Maven Prepare ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Setup local maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- name: Commit and Push Credentials
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Run Shell Script
run: |
./.ci/release-maven-prepare.sh ${{ inputs.version }}
- name: Push commit
run: |
git push origin master --tags