1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # https://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ name : " Release - Drop Staging"
17+ on :
18+ workflow_dispatch :
19+ jobs :
20+ publish :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Drop staging repository from Nexus
24+ env :
25+ NEXUS_STAGE_DEPLOYER_USER : ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
26+ NEXUS_STAGE_DEPLOYER_PW : ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
27+ STAGING_PROFILE_ID : ${{ secrets.STAGING_PROFILE_ID }}
28+ run : |
29+ response=$(curl -s --request POST -u "$NEXUS_STAGE_DEPLOYER_USER:$NEXUS_STAGE_DEPLOYER_PW" \
30+ --url https://repository.apache.org/service/local/staging/bulk/drop \
31+ --header 'Content-Type: application/json' \
32+ --header 'Accept: application/json' \
33+ --header 'User-Agent: Grails Github Actions' \
34+ --data '{ "data" : {"stagedRepositoryIds":["'"$STAGING_PROFILE_ID"'"], "description":"Drop '"$STAGING_PROFILE_ID"'." } }')
35+
36+ if [ ! -z "$response" ]; then
37+ echo "Error while dropping staged repository $STAGING_PROFILE_ID : $response."
38+ exit 1
39+ else
40+ echo "Successfully dropped repository $STAGING_PROFILE_ID."
41+ fi
0 commit comments