This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8f858f
commit 4011d1d
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Maven Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- shervann | ||
- 'release/**' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
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 | ||
|
||
- name: Configure Maven settings | ||
run: echo "<settings><servers><server><id>github</id><username>danieldieeins</username><password>${{ secrets.GITHUB_TOKEN }}</password></server></servers></settings>" > ${{ github.workspace }}/settings.xml | ||
|
||
- name: Extract version from pom.xml | ||
id: extract_version | ||
run: | | ||
echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
- name: Build with Maven | ||
id: build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mvn clean package --settings ${{ github.workspace }}/settings.xml |