fullfill tag info on v0.1
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 24s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 24s
This commit is contained in:
parent
9f5f6ddf3f
commit
b6e032e90f
@ -37,12 +37,16 @@ jobs:
|
||||
- name: Extract Release Info from Git
|
||||
id: release_info
|
||||
run: |
|
||||
TAG_NAME=$(git describe --tags --abbrev=0)
|
||||
echo "tag_name=$TAG_NAME" >> $GITHUB_ENV
|
||||
|
||||
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
|
||||
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
||||
echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_ENV
|
||||
|
||||
echo "Tag Name: $TAG_NAME"
|
||||
echo "Branch Name: $BRANCH_NAME"
|
||||
echo "Commit Message: $COMMIT_MESSAGE"
|
||||
- name: Upload to Gitea Release
|
||||
@ -53,6 +57,7 @@ jobs:
|
||||
RELEASE_DATA=$(curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tag_name\": \"$GITHUB_ENV\",
|
||||
\"target_commitish\": \"$branch_name\",
|
||||
\"name\": \"$tag_name\",
|
||||
\"body\": \"$commit_message\",
|
||||
@ -63,6 +68,8 @@ jobs:
|
||||
# 提取 Release ID
|
||||
RELEASE_ID=$(echo "$RELEASE_DATA" | jq -r '.id')
|
||||
|
||||
echo "Release id is $RELEASE_ID"
|
||||
|
||||
# 上传文件
|
||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user