1.5 KiB
1.5 KiB
Gitea Release에 APK 업로드 방법
환경
- Git 호스팅: git.webpluss.net (Gitea)
- 저장소: sanjeok77/ShiftRing
- 태그: v1.1.9
- APK 경로: C:\Users\work\Desktop\1.0.0\app.apk
1. Release ID 확인
# Release 목록 조회
curl -s "https://git.webpluss.net/api/v1/repos/sanjeok77/ShiftRing/releases"
응답에서 Release ID 확인 (예: id: 5)
2. APK 업로드
# Personal Access Token 사용
curl -s -u "username:TOKEN" \
-X POST "https://git.webpluss.net/api/v1/repos/sanjeok77/ShiftRing/releases/5/assets" \
-F "attachment=@C:/Users/work/Desktop/1.0.0/app.apk" \
-F "name=app.apk"
3. 릴리즈 설명 수정 (한글 깨짐 방지)
# --data-binary 사용하고 stdin으로 JSON 전달
curl -s -u "sanjeok77:TOKEN" \
-X PATCH "https://git.webpluss.net/api/v1/repos/sanjeok77/ShiftRing/releases/5" \
-H "Content-Type: application/json; charset=utf-8" \
--data-binary @- << 'EOF'
{"body":"## v1.1.9 - 수정 내용\n\n- 수정사항 1\n- 수정사항 2\n\nNo description provided"}
EOF
한글 깨짐 방지 팁
-H "Content-Type: application/json; charset=utf-8"추가--data-binary @-사용 (stdin에서 읽기)<< 'EOF'로 HEREDOC 사용 (변수展開 방지)
4. 확인
# 릴리즈 정보 조회
curl -s "https://git.webpluss.net/api/v1/repos/sanjeok77/ShiftRing/releases/5"
참고
- GitLab이 아닌 Gitea 이므로 API 경로가 다름
- GitLab:
/api/v4/projects/:id/releases - Gitea:
/api/v1/repos/:owner/:repo/releases/:id