Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,9 @@ jobs:
with:
maven-version: 3.9.6

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Run tests
run: mvn clean test

test:
name: Run tests
runs-on: ubuntu-latest
Expand All @@ -62,13 +51,5 @@ jobs:
with:
maven-version: 3.9.6

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Run tests
run: mvn clean test
21 changes: 18 additions & 3 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ on:
jobs:
update-version:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]'

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set Up Java
uses: actions/setup-java@v3
Expand All @@ -29,11 +32,23 @@ jobs:
mvn versions:set -DnewVersion=$NEW_VERSION
mvn versions:commit

- name: Commit and push changes
- name: Create new branch and commit changes
run: |
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
git checkout -b update-version-${{ env.NEW_VERSION }}
git add pom.xml
git commit -m "Update project version to ${{ env.NEW_VERSION }}"
git pull --rebase
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:main

- name: Push changes to new branch
run: |
git push origin update-version-${{ env.NEW_VERSION }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Update project version to ${{ env.NEW_VERSION }}"
body: "Automated version update by GitHub Actions."
branch: update-version-${{ env.NEW_VERSION }}
base: main