Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Create github runner file
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldieeins committed Apr 29, 2024
1 parent a8f858f commit 4011d1d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/maven-publish.yml
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

0 comments on commit 4011d1d

Please sign in to comment.