Compare commits

..

4 Commits

Author SHA1 Message Date
Klop233
684bedefaa Update CI 2024-04-13 18:38:21 +08:00
Klop233
a35c3ec981 Update CI 2024-04-13 18:28:07 +08:00
Klop233
0461985e95 Update CI 2024-04-13 18:15:03 +08:00
Klop233
04b1668fa7 Update CI 2024-04-13 18:00:45 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ on:
permissions: write-all
jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest
environment: default
steps:

View File

@@ -16,7 +16,7 @@ if [ $pre = "true" ]; then
else
channel="default"
fi
changes=$(git log -1 --pretty="[{\\\"commit\\\": \\\"%H\\\", \\\"message\\\": \\\"%s\\\", \\\"summary\\\": \\\"%s\\\"}]")
changes=$(git log -1 --pretty="[{\"commit\": \"%H\", \"message\": \"%s\", \"summary\": \"%s\"}]")
jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar`
jar_name="luminol-1.20.4-paperclip.jar"
ctime=$(date -u +"%s")"000"
@@ -27,6 +27,7 @@ echo "Authentication: $secret_v2"
json=$(printf "{\\\"channel\\\":\\\"%s\\\", \\\"jar_name\\\":\\\"%s\\\", \\\"sha256\\\":\\\"%s\\\", \\\"tag\\\":\\\"%s\\\", \\\"time\\\":\\\"%s\\\", \\\"changes\\\":\\\"%s\\\"}" \
"$channel" "$jar_name" "$jar_sha256" "$tag" "$ctime" "$changes")
echo "[DEBUG] $json"
echo "[DEBUG] $changes"
echo "[DEBUG] curl --location --request POST \"https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit\" \
-H \"Content-Type: application/x-www-form-urlencoded\" \
-H \"Authorization: $secret_v2\" \
@@ -36,7 +37,6 @@ echo "[DEBUG] curl --location --request POST \"https://api.luminolmc.com/v2/proj
--data-urlencode \"release_tag=$tag\" \
--data-urlencode \"time=$ctime\" \
--data-urlencode \"changes=$changes\""
curl -L --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: $secret_v2" \