Skip to content

Commit

Permalink
CI: remove close release workflow step
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Feb 21, 2023
1 parent 7cc22c3 commit 4793c14
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/plugin-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,36 +555,3 @@ jobs:
sed -r -i "s/${STABLE_TAG_REGEX}/Stable tag: ${PLUGIN_VERSION}/g" ./trunk/readme.txt
svn commit -m "Releasing version $PLUGIN_VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
close-release:
name: Close ZenHub release
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [create-release]
if: ${{ ! contains(github.event.inputs.version, 'rc') }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@c8454efe5d0bdefd25384362fe217428ca277d57
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

# https://github.com/ZenHubIO/API#get-release-reports-for-a-repository
# https://github.com/ZenHubIO/API#add-or-remove-issues-to-or-from-a-release-report
- name: Close release report
id: zenhub_release
run: |
echo "Getting list of releases from ZenHub"
RELEASES=$(curl -f -s -H "X-Authentication-Token: $ZENHUB_API_TOKEN" "https://api.zenhub.com/p1/repositories/${GITHUB_REPO_ID}/reports/releases")
CURRENT_RELEASE=$((echo $RELEASES ) | jq -r "first(.[] | select( .title == \"$PLUGIN_VERSION\" )) | .release_id")
if [[ -z $CURRENT_RELEASE ]]; then
echo "No ZenHub release found. Check whether the release titles match the expected plugin version."
exit 1
else
echo "Closing release report on ZenHub for release: $CURRENT_RELEASE"
curl -f -s -H "X-Authentication-Token: $ZENHUB_API_TOKEN" -H 'Content-Type: application/json' -X PATCH "https://api.zenhub.com/p1/reports/release/${CURRENT_RELEASE}" -d '{ "state": "closed" }'
fi
env:
ZENHUB_API_TOKEN: ${{ secrets.ZENHUB_API_TOKEN }}

0 comments on commit 4793c14

Please sign in to comment.