Fix removal of old nightly releases (#9423)

<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

Fix removal of old nightly releases
This commit is contained in:
Justin Ma 2023-06-13 21:43:07 +08:00 committed by GitHub
parent 54f8e3442b
commit f438ffc6e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,11 +64,11 @@ jobs:
git push origin --delete $release.tag_name
print $'Deleting release ($release.tag_name)'
let delete_url = $'https://api.github.com/repos/nushell/nightly/releases/($release.id)'
# let version = [X-GitHub-Api-Version 2022-11-28]
# let auth = [Authorization 'Bearer ${{ secrets.GITHUB_TOKEN }}']
# let accept = [Accept 'application/vnd.github+json']
let version = "X-GitHub-Api-Version: 2022-11-28"
let accept = "Accept: application/vnd.github+json"
let auth = "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
# http delete $delete_url -H $version -H $auth -H $accept
curl -L -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" -H "X-GitHub-Api-Version: 2022-11-28" $delete_url
curl -L -X DELETE -H $accept -H $auth -H $version $delete_url
}
all: