10
0
Fork 0
mirror of https://code.forgejo.org/actions/forgejo-release synced 2026-04-13 21:24:17 +00:00

feat: use curl to create release and upload assets (#143)

Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/143
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
Michael Kriese 2026-02-17 22:55:54 +00:00 committed by Michael Kriese
parent 6c747b97f9
commit 6e3a26f82a
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
3 changed files with 47 additions and 66 deletions

View file

@ -4,33 +4,17 @@
set -ex
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
test_system_tea_bin() {
SYSTEM_TEA_BIN=$TMP_DIR/tea
touch $SYSTEM_TEA_BIN && chmod +x $SYSTEM_TEA_BIN
export PATH=$TMP_DIR:$PATH
setup_tea
test $TEA_BIN == $SYSTEM_TEA_BIN
}
test_download_tea_bin() {
# assume tea is not installed on system
setup_tea
test $TEA_BIN == $TMP_DIR/tea
}
test_teardown() {
setup_api
api DELETE repos/$REPO/releases/tags/$TAG || true
api DELETE repos/$REPO/tags/$TAG || true
api_json DELETE repos/$REPO/releases/tags/$TAG || true
api_json DELETE repos/$REPO/tags/$TAG || true
rm -fr dist/release
setup_tea
$TEA_BIN login delete $DOER || true
}
test_reset_repo() {
local project="$1"
api DELETE repos/$REPO || true
api POST user/repos --data-raw '{"name":"'$project'", "auto_init":true}'
api_json DELETE repos/$REPO || true
api_json POST user/repos --data-raw '{"name":"'$project'", "auto_init":true}'
git clone $FORGEJO/$REPO $TMP_DIR/repo
SHA=$(git -C $TMP_DIR/repo rev-parse HEAD)
}