Skip to content

Commit 7f8add5

Browse files
Create Github action to prepare next development iteration.
It was copied from sonar-scanner-maven.
1 parent 432effe commit 7f8add5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Prepare Next Development Iteration
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
nextVersion:
7+
description: Version number of the next iteration
8+
required: true
9+
10+
jobs:
11+
Next-Iteration-Job:
12+
name: Next Iteration Job
13+
runs-on: github-ubuntu-latest-s
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
18+
steps:
19+
20+
- name: Checkout Sources
21+
uses: actions/checkout@v4
22+
23+
- name: Update Version Number
24+
env:
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
git config user.name "${GITHUB_ACTOR}"
28+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
29+
git config --global core.autocrlf input
30+
git config --global core.safecrlf true
31+
BRANCH="gh-action/next-iteration.${{ github.run_id }}"
32+
git checkout -b "$BRANCH"
33+
mvn versions:set -DgenerateBackupPoms=false -DnewVersion="${{ inputs.nextVersion }}"
34+
git commit -m "Prepare next development iteration ${{ inputs.nextVersion }}" -a
35+
git push --set-upstream origin "$BRANCH"
36+
37+
- name: Create Pull Request
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
gh pr create --base master --title "Prepare next development iteration ${{ inputs.nextVersion }}" --body ''

0 commit comments

Comments
 (0)