Skip to content

Commit

Permalink
Use correct version in glob expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaar, Bjørn-Andre committed Nov 10, 2023
1 parent 93f7ac3 commit 16d3e13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
mvn --batch-mode release:prepare -Darguments="-Dmaven.deploy.skip=true -DskipTests"
# Get the release version from the pom.xml before the next snapshot increment
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
mvn --batch-mode release:perform
TAG=$(git describe --abbrev=0 --tags)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Create GitHub release draft
Expand All @@ -81,10 +84,10 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# Get all files matching the artifact id and version (source, javadoc, etc.)
ARTIFACT_GLOB=(./target/$ARTIFACT_ID-$VERSION*.jar)
ARTIFACT_GLOB=(./target/$ARTIFACT_ID-${{ steps.release_jar.outputs.version }}*.jar)
for file in "${ARTIFACT_GLOB[@]}"; do
echo "Uploading $file"
gh release upload ${{ steps.create_github_release.outputs.tag_name }} $file
done
Expand Down

0 comments on commit 16d3e13

Please sign in to comment.