Skip to content

Commit

Permalink
Export staging repository ID from staging step
Browse files Browse the repository at this point in the history
  • Loading branch information
karllessard authored Apr 5, 2024
1 parent b6d4d5a commit 8f5f7e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ jobs:
https://oss.sonatype.org/service/local/staging/profiles/$STAGING_PROFILE_ID/start
export STAGING_REPOSITORY_ID=`awk -F'[<>]' '/stagedRepositoryId/{print $3}' response.xml`
echo "Staging repository created: $STAGING_REPOSITORY_ID"
echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID"
- name: Checkout repository
uses: actions/checkout@v1
- name: Extract distribution repository URL
id: repository
run: |
if [[ "${{ env.DEPLOY_RELEASE }}" = "true" ]]; then
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=$STAGING_REPOSITORY_ID`
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=${{ steps.staging.outputs.stagingRepositoryId }}`
else
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.snapshotRepository.url}"`
fi
Expand Down

0 comments on commit 8f5f7e9

Please sign in to comment.