diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 774d9f9..89cd56c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -10,7 +10,6 @@ on: jobs: build: - runs-on: ubuntu-latest permissions: @@ -18,19 +17,23 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 + - uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + persist-credentials: true + + - name: set local github name + run: | + git config --local user.email "lars@lars-opitz.de" + git config --local user.name "GitHub Action" + + - name: Set up build environment uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - - - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - persist-credentials: true - name: Build with Maven run: mvn -B package --file pom.xml @@ -50,10 +53,7 @@ jobs: run: ./mvnw -B package - name: Commit files - run: | - git config --local user.email "lars@lars-opitz.de" - git config --local user.name "GitHub Action" - git commit -m "release version" -a + run: git commit -m "release version" -a - name: Push changes uses: ad-m/github-push-action@master @@ -78,10 +78,7 @@ jobs: run: ./mvnw -B org.codehaus.mojo:build-helper-maven-plugin:3.0.0:parse-version versions:set versions:commit -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0-SNAPSHOT' - name: Commit files - run: | - git config --local user.email "lars@lars-opitz.de" - git config --local user.name "GitHub Action" - git commit -m "preparing next version" -a + run: git commit -m "preparing next version" -a - name: Push changes uses: ad-m/github-push-action@master