Skip to content

Commit

Permalink
fix: properly declare output of prepare-version job
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Laprun <[email protected]>
  • Loading branch information
metacosm committed Oct 30, 2024
1 parent 263b934 commit 6991ba0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ concurrency:
jobs:
prepare-version:
runs-on: ubuntu-latest
outputs:
version: ${{steps.snapshot-version.outputs.version}}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -49,16 +51,22 @@ jobs:
cache: 'maven'

- name: Retrieve and export project version
id: project-version
run: |
version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Project version: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
- name: Override project version if requested
if: ${{ inputs.version != '' }}
id: snapshot-version
run: |
echo "Version override requested: ${{inputs.version}}"
echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT
if [ -z "${{inputs.version}}" ];
then
echo "version=${{steps.project-version.outputs.version}}" >> $GITHUB_OUTPUT
else
echo "Version override requested: ${{inputs.version}}"
echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT
fi
deploy-snapshot:
name: Deploy Snapshots
Expand Down

0 comments on commit 6991ba0

Please sign in to comment.