mirror of
https://github.com/andreacomo/maven-gav-extractor.git
synced 2025-06-06 11:17:55 +08:00
First action version
This commit is contained in:
parent
2bf3de3666
commit
d6d9c6f7b1
26
action.yml
Normal file
26
action.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: 'Maven GAV Extractor'
|
||||||
|
description: 'Extract Maven grouoId, artifactId and version from pom.xml'
|
||||||
|
inputs:
|
||||||
|
pom-location:
|
||||||
|
description: 'Full path to pom.xml file'
|
||||||
|
required: true
|
||||||
|
default: ${{ github.workspace }}/pom.xml
|
||||||
|
outputs:
|
||||||
|
group-id:
|
||||||
|
description: Group Id
|
||||||
|
value: ${{ steps.evaluate.outputs.group-id }}
|
||||||
|
artifact-id:
|
||||||
|
description: Artifact Id
|
||||||
|
value: ${{ steps.evaluate.outputs.artifact-id }}
|
||||||
|
version:
|
||||||
|
description: Version
|
||||||
|
value: ${{ steps.evaluate.outputs.version }}
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- id: revaluate
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=group-id::$(mvn -f ${{ inputs.pom-location }} org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.groupId -q -DforceStdout)"
|
||||||
|
echo "::set-output name=artifact-id::$(mvn -f ${{ inputs.pom-location }} org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.artifactId -q -DforceStdout)"
|
||||||
|
echo "::set-output name=version::$(mvn -f ${{ inputs.pom-location }} org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)"
|
||||||
|
shell: bash
|
Loading…
x
Reference in New Issue
Block a user