Skip to content

Commit

Permalink
Restore the project-version output
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Oct 17, 2024
1 parent fe18e32 commit 355f37b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-release-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
required: true
type: string
outputs:
project-version:
description: The version of the project
value: ${{ jobs.deploy.outputs.project-version }}
nexus-url:
description: The URL of the Nexus repository used
value: ${{ jobs.deploy.outputs.nexus-url }}
Expand All @@ -53,6 +56,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
outputs:
project-version: ${{ steps.version.outputs.project-version }}
nexus-url: ${{ steps.nexus.outputs.nexus-url }}
steps:

Expand All @@ -78,6 +82,7 @@ jobs:
git config user.email [email protected]
- name: Export version
id: version
shell: bash
env:
GIT_BRANCH_NAME: ${{ github.ref_name }}
Expand All @@ -88,6 +93,8 @@ jobs:
}
export PROJECT_VERSION=$(echo "$GIT_BRANCH_NAME" | sed 's/^release\///')
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
# Export version to calling workflow
echo "project-version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
- name: Set the Maven `revision` property
shell: bash
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/deploy-snapshot-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
default: 17
type: string
outputs:
project-version:
description: The version of the project
value: ${{ jobs.deploy.outputs.project-version }}
nexus-url:
description: The URL of the Nexus repository used
value: ${{ jobs.deploy.outputs.nexus-url }}
Expand All @@ -40,6 +43,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
outputs:
project-version: ${{ steps.version.outputs.project-version }}
nexus-url: ${{ steps.nexus.outputs.nexus-url }}
steps:

Expand All @@ -57,6 +61,7 @@ jobs:
server-password: NEXUS_PASSWORD

- name: Export version
id: version
shell: bash
run: |
export PROJECT_VERSION=$(./mvnw \
Expand All @@ -65,6 +70,8 @@ jobs:
help:evaluate \
| tail -n 1)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
# Export version to calling workflow
echo "project-version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
- name: Upload to Nexus
id: nexus
Expand Down
2 changes: 1 addition & 1 deletion src/changelog/.11.x.x/export_deployment_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
type="changed">
<issue id="246" link="https://github.com/apache/logging-parent/pull/246"/>
<description format="asciidoc">
The `deploy-*-reusable` workflows export the URL of the Nexus repository as `nexus-url` workflow output.
The `deploy-*-reusable` workflows export the URL of the Nexus repository as `nexus-url` workflow output and the project version as `project-version`.
</description>
</entry>

0 comments on commit 355f37b

Please sign in to comment.