Skip to content

Commit

Permalink
use gh CLI instead of curl
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 13, 2024
1 parent e5301eb commit 75407f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 13 additions & 11 deletions .release/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ echo "tag $TAGNAME"
git tag "$TAGNAME"
git push --tags

# create a GitHub release
# https://developer.github.com/v3/repos/releases/#create-a-release
echo "hint: your GitHub OTP password"
# GitHub CLI api
# https://cli.github.com/manual/gh_api

curl -u msimerson -X POST https://api.github.com/repos/msimerson/mail-dmarc/releases -H 'Content-Type: application/json' -d "{
\"tag_name\": \"$TAGNAME\",
\"target_commitish\": \"master\",
\"name\": \"$TAGNAME\",
\"body\": \"Description of the release\",
\"draft\": true,
\"prerelease\": false
}"
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/msimerson/mail-dmarc/releases \
-f tag_name="$TAGNAME" \
-f target_commitish='master' \
-f name="$TAGNAME" \
-F draft=true \
-F prerelease=false \
-F generate_release_notes=true
4 changes: 2 additions & 2 deletions .release/version_increment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

. .release/base.sh || exit

assure_repo_is_clean || exit
#assure_repo_is_clean || exit

NEWVER="$(get_version)"
NEWVER="1.20240314"

# shellcheck disable=SC2046
sed -i '' \
Expand Down

0 comments on commit 75407f0

Please sign in to comment.