feat(release): You can now set the gitea release as a draft and prerelease
This commit is contained in:
parent
562a7542f3
commit
4f19015123
@ -12,6 +12,8 @@ Uses changelogen for changelog generation, is able to create gitea releases and
|
|||||||
## Settings 🛠️
|
## Settings 🛠️
|
||||||
* `GITEA_DOMAIN`: Domain name of your gitea server - if not set release creation get's skipped
|
* `GITEA_DOMAIN`: Domain name of your gitea server - if not set release creation get's skipped
|
||||||
* `GITEA_APIKEY`: Api token for a gitea user that has the privileges to create releases in your repo
|
* `GITEA_APIKEY`: Api token for a gitea user that has the privileges to create releases in your repo
|
||||||
|
* `GITEA_DRAFT`: Mark gitea release as draft - defaults to false
|
||||||
|
* `GITEA_PRERELEASE`: Mark gitea release as prerelease - defaults to false
|
||||||
* `MATRIX_SERVER`: The matrix server's domain name - if not set notification sending get's skipped
|
* `MATRIX_SERVER`: The matrix server's domain name - if not set notification sending get's skipped
|
||||||
* `MATRIX_USER`: The matrix user's username
|
* `MATRIX_USER`: The matrix user's username
|
||||||
* `MATRIX_PASSWORD`: The matrix user's password
|
* `MATRIX_PASSWORD`: The matrix user's password
|
||||||
|
@ -39,6 +39,12 @@ if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then
|
|||||||
echo "Falling back to drone repo name";
|
echo "Falling back to drone repo name";
|
||||||
PLUGIN_REPO=$CI_REPO_NAME
|
PLUGIN_REPO=$CI_REPO_NAME
|
||||||
fi
|
fi
|
||||||
|
if [ "${PLUGIN_GITEA_DRAFT:-null}" = null ]; then
|
||||||
|
PLUGIN_GITEA_DRAFT=false
|
||||||
|
fi
|
||||||
|
if [ "${PLUGIN_GITEA_PRERELEASE:-null}" = null ]; then
|
||||||
|
PLUGIN_GITEA_PRERELEASE=true
|
||||||
|
fi
|
||||||
|
|
||||||
curl --request POST \
|
curl --request POST \
|
||||||
--url "https://$PLUGIN_GITEA_DOMAIN/api/v1/repos/$PLUGIN_REPO/releases" \
|
--url "https://$PLUGIN_GITEA_DOMAIN/api/v1/repos/$PLUGIN_REPO/releases" \
|
||||||
@ -47,7 +53,8 @@ if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then
|
|||||||
--data "{
|
--data "{
|
||||||
\"name\": \"$CURRENTTAG\",
|
\"name\": \"$CURRENTTAG\",
|
||||||
\"body\": \"$ALLCHANGES\",
|
\"body\": \"$ALLCHANGES\",
|
||||||
\"draft\": false,
|
\"draft\": $PLUGIN_GITEA_DRAFT,
|
||||||
|
\"prerelease\": $PLUGIN_GITEA_PRERELEASE,
|
||||||
\"tag_name\": \"$CURRENTTAG\"
|
\"tag_name\": \"$CURRENTTAG\"
|
||||||
}"
|
}"
|
||||||
echo "Release created";
|
echo "Release created";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user