8 Commits
v0.0.5 ... dev

Author SHA1 Message Date
Timi
a694189d96 v0.0.8
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 38s
2026-03-25 15:39:04 +08:00
Timi
c6e2e9cc6d v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 53s
2026-03-25 15:32:19 +08:00
Timi
c5466ec373 v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 1m15s
2026-03-25 15:24:55 +08:00
Timi
0cf0458127 v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 5s
2026-03-25 15:22:22 +08:00
Timi
d4233f6c46 v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 25s
2026-03-25 15:03:58 +08:00
Timi
b15090d558 v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 1m1s
2026-03-25 14:47:46 +08:00
Timi
26f34fda40 v0.0.7
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 28s
2026-03-17 16:39:55 +08:00
Timi
25f431c009 v0.0.6
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 1m30s
2026-03-17 11:01:44 +08:00
4 changed files with 27 additions and 69 deletions

View File

@@ -92,71 +92,20 @@ jobs:
}
EOF
)
echo "Creating release with tag: $RELEASE_TAG"
echo "API URL: $api_url"
echo "Target commit: $RELEASE_TARGET"
http_code=$(curl -sS -w "%{http_code}" -o /tmp/release_response.json -X POST "$api_url" \
response=$(curl -sS -X POST "$api_url" \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "$payload")
response=$(cat /tmp/release_response.json)
echo "HTTP Status: $http_code"
echo "Response: $response"
if [ "$http_code" -ne 201 ]; then
echo "Failed to create release (HTTP $http_code)"
if echo "$response" | grep -q "already exists"; then
echo "Release with tag $RELEASE_TAG already exists"
fi
exit 1
fi
release_id=$(echo "$response" | grep -oP '"id":\K[0-9]+' | head -n 1 || true)
if [ -z "$release_id" ]; then
echo "Failed to extract release ID from response"
release_id=$(echo "$response" | grep -o '"id":[0-9]*' | head -n 1 | grep -o '[0-9]*')
if [ -z "$release_id" ] || echo "$response" | grep -q '"message"'; then
echo "Create release failed: $response"
exit 1
fi
echo "Release created: id=$release_id"
echo "Listing jar files in target directory:"
ls -lh target/*.jar || echo "No jar files found"
upload_count=0
for asset_path in target/*.jar; do
if [ ! -f "$asset_path" ]; then
echo "Skipping non-existent file: $asset_path"
continue
fi
asset_name=$(basename "$asset_path")
file_size=$(stat -c%s "$asset_path" 2>/dev/null || echo "unknown")
echo "Uploading asset: $asset_name (size: $file_size bytes)"
upload_url="$api_url/$release_id/assets?name=$asset_name"
echo "Upload URL: $upload_url"
set +e
http_code=$(curl -sS -w "%{http_code}" -o /tmp/asset_response.json -X POST "$upload_url" \
curl -sS -X POST "$api_url/$release_id/assets?name=$asset_name" \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$asset_path" 2>/dev/null)
curl_exit=$?
set -e
if [ $curl_exit -ne 0 ]; then
echo "✗ Curl failed with exit code $curl_exit for $asset_name"
cat /tmp/asset_response.json 2>/dev/null || echo "No response file"
continue
fi
if [ "$http_code" = "201" ]; then
echo "✓ Successfully uploaded: $asset_name"
upload_count=$((upload_count + 1))
else
echo "✗ Failed to upload $asset_name (HTTP $http_code)"
cat /tmp/asset_response.json 2>/dev/null || echo "No response body"
fi
--data-binary @"$asset_path"
done
echo "Upload complete: $upload_count file(s) uploaded"

View File

@@ -6,7 +6,7 @@
<groupId>com.imyeyu.network</groupId>
<artifactId>timi-network</artifactId>
<version>0.0.5</version>
<version>0.0.8</version>
<packaging>jar</packaging>
<properties>
@@ -92,7 +92,7 @@
<dependency>
<groupId>com.imyeyu.io</groupId>
<artifactId>timi-io</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
@@ -100,9 +100,9 @@
<version>5.6</version>
</dependency>
<dependency>
<groupId>tools.jackson.core</groupId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>3.1.0</version>
<version>2.21.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>

View File

@@ -1,17 +1,20 @@
package com.imyeyu.network;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.apache.hc.client5.http.fluent.Request;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpEntity;
import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JsonNode;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.node.ArrayNode;
import tools.jackson.databind.node.ObjectNode;
import java.io.IOException;
import java.lang.reflect.Type;
import java.text.SimpleDateFormat;
/**
* 基于 Jackson 的请求封装。
@@ -23,6 +26,12 @@ public class JacksonRequest extends CommonRequest {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
static {
OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
OBJECT_MAPPER.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
private ObjectMapper objectMapper = null;
protected JacksonRequest(Request request) {

View File

@@ -1,10 +1,10 @@
package com.imyeyu.network;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.imyeyu.java.bean.timi.TimiResponse;
import org.apache.hc.client5.http.fluent.Request;
import org.apache.hc.core5.http.HttpEntity;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;
import java.io.IOException;
import java.lang.reflect.Type;