Skip to content

Commit 9edf80f

Browse files
committed
Fix jq
1 parent e9c6763 commit 9edf80f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/releasepublished.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,9 @@ jobs:
176176
curl --fail -v -X POST -d @start.xml -H "Content-Type:application/xml" -H "Authorization: Bearer ${{ secrets.PORTAL_ACCESS_TOKEN }}" https://ossrh-staging-api.central.sonatype.com/service/local/staging/profiles/b39883a429024e/start -o $WD/finish.xml
177177
rm start.xml
178178
curl --fail -H "Accept:application/json" -H "Authorization: Bearer ${{ secrets.PORTAL_ACCESS_TOKEN }}" 'https://ossrh-staging-api.central.sonatype.com/manual/search/repositories?state=open' -o results.json
179+
SELECTOR="sdk-${{github.run_id}}-${{github.run_attempt}}"
179180
cat results.json
180-
cat results.json | jq --raw-output --arg SELECTOR "sdk-${{github.run_id}}-${{github.run_attempt}}" '.[][]'
181-
cat results.json | jq --raw-output --arg SELECTOR "sdk-${{github.run_id}}-${{github.run_attempt}}" '.[][] | select(.description == "${SELECTOR}").key'
182-
cat results.json | jq --raw-output --arg SELECTOR "sdk-${{github.run_id}}-${{github.run_attempt}}" '.[][] | select(.description == "${SELECTOR}").key' | jq -sRr '@uri'
183-
repository_namespace=$(cat results.json | jq --raw-output --arg SELECTOR "sdk-${{github.run_id}}-${{github.run_attempt}}" '.[][] | select(.description == "${SELECTOR}").key' | jq -sRr '@uri')
181+
repository_namespace=`cat results.json | jq --raw-output --arg SELECTOR $SELECTOR ".[][] | select(.description == \"$SELECTOR\").key" | jq -sRr "@uri"`
184182
echo $repository_namespace
185183
rm results.json
186184
ls -lahn $WD
@@ -195,5 +193,5 @@ jobs:
195193
cp $WD/finish.xml finish.xml
196194
curl -X POST -H "Accept:application/json" -H "Authorization: Bearer ${{ secrets.PORTAL_ACCESS_TOKEN }}" https://ossrh-staging-api.central.sonatype.com/manual/upload/repository/${repository_namespace}?publishing_type=user_managed -o status.json
197195
cat status.json
198-
portal_id=$(cat status.json | jq --raw-output --arg SELECTOR "sdk-${{github.run_id}}-${{github.run_attempt}}" '.[][] | select(.description == "${SELECTOR}").portal_deployment_id')
196+
portal_id=`cat status.json | jq --raw-output --arg SELECTOR $SELECTOR ".[][] | select(.description == \"$SELECTOR\").portal_deployment_id")`
199197
echo https://central.sonatype.com/api/v1/publisher/deployment/${portal_id}/download/

0 commit comments

Comments
 (0)