Skip to content

Commit

Permalink
Update maven-publish.yml (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lopitz committed Dec 27, 2023
1 parent 3971562 commit b0d0d66
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,30 @@ on:

jobs:
build:

runs-on: ubuntu-latest

permissions:
contents: read
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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b0d0d66

Please sign in to comment.