File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ ## Using IT
12Setup token
23
34``` bash
@@ -25,3 +26,11 @@ REPO_TOKEN=8094deb9fe1d7d15598a8e7b876e151810630635
2526``` bash
2627./github-cli.sh release mageddo-projects github-cli v1.0 master " some description" tmp.zip
2728```
29+
30+ ## Contributing
31+
32+ ### Generating a release
33+
34+ ```
35+ /github-cli.sh release mageddo-projects github-cli v1.5 master "some description" github-cli.sh
36+ ```
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ create_release(){
1919 "prerelease": true
2020 }' | sed -r ' s/[\]{2}/\\/g' )
2121 (curl -s -X POST -w ' %{stderr}%{http_code}\n%{stdout}\n' \
22+ -H " Authorization: token ${REPO_TOKEN} " \
2223 " https://api.github.com/repos/${USERNAME} /${REPOSITORY} /releases?access_token=$REPO_TOKEN " \
2324 --data " $PAYLOAD " | \
2425 tee -a /dev/stderr | jq -r ' .id' ) 2> /tmp/stderr 1> /tmp/stdout
@@ -35,7 +36,8 @@ create_release(){
3536upload_file (){
3637 local OUT=$( curl --data-binary " @$SOURCE_FILE " -w " \n%{http_code}\n" \
3738 -s -X POST -H ' Content-Type: application/octet-stream' \
38- " https://uploads.github.com/repos/${USERNAME} /${REPOSITORY} /releases/$RELEASE_ID /assets?name=$TARGET_FILE &access_token=$REPO_TOKEN "
39+ -H " Authorization: token ${REPO_TOKEN} " \
40+ " https://uploads.github.com/repos/${USERNAME} /${REPOSITORY} /releases/$RELEASE_ID /assets?name=$TARGET_FILE "
3941 )
4042
4143 if test " $( echo " $OUT " | tail -n 1) " -ne " 201" ; then
@@ -63,8 +65,8 @@ validate_repo_token(){
6365}
6466
6567create_tag (){
66- git config user.email " builds@travis-ci .com"
67- git config user.name " Travis CI "
68+ git config user.email " githubcli@github .com"
69+ git config user.name " Github CLI "
6870
6971 git commit -a -m " Releasing ${APP_VERSION} " || true
7072 git tag ${APP_VERSION}
You can’t perform that action at this time.
0 commit comments