Skip to content

Commit

Permalink
feat(gha): use gh cli tool
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Nov 25, 2023
1 parent de83a7d commit d010ca1
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,7 @@ jobs:
# extract the changelog
sed -n "${first},${last}p;${end}q" CHANGES.rst > body.txt
# remove new line characters
sed -z 's/\n/\\n/g' body.txt > body.json
cat body.txt
echo '{"tag_name": "${{ github.ref_name }}",' > data.json
echo '"name": "${{ github.ref_name }}",' >> data.json
echo '"body": "' >> data.json
cat body.json >> data.json
echo '"}"' >> data.json
cat data.json
curl -L \
-X POST \
--header "Accept: application/vnd.github+json" \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
https://api.github.com/repos/${{ github.repository }}/releases \
-d "@data.json"
gh release create ${{ github.ref_name }} -p -F body.txt

0 comments on commit d010ca1

Please sign in to comment.