Skip to content

Commit b0b8ef5

Browse files
karllessardCraigacp
authored andcommitted
Export staging repository ID from staging step
1 parent 723bdcd commit b0b8ef5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: .github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ jobs:
4949
https://oss.sonatype.org/service/local/staging/profiles/$STAGING_PROFILE_ID/start
5050
export STAGING_REPOSITORY_ID=`awk -F'[<>]' '/stagedRepositoryId/{print $3}' response.xml`
5151
echo "Staging repository created: $STAGING_REPOSITORY_ID"
52+
echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID"
5253
- name: Checkout repository
5354
uses: actions/checkout@v1
5455
- name: Extract distribution repository URL
5556
id: repository
5657
run: |
5758
if [[ "${{ env.DEPLOY_RELEASE }}" = "true" ]]; then
58-
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=$STAGING_REPOSITORY_ID`
59+
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=${{ steps.staging.outputs.stagingRepositoryId }}`
5960
else
6061
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.snapshotRepository.url}"`
6162
fi

0 commit comments

Comments
 (0)