This commit is contained in:
@@ -37,20 +37,9 @@ jobs:
|
|||||||
run: sha256sum yoo-* > checksums.txt
|
run: sha256sum yoo-* > checksums.txt
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
uses: gitea/gitea-release-action@v1
|
||||||
GITEA_TOKEN: ${{ secrets.release_token }}
|
with:
|
||||||
GITEA_REPO: ${{ github.repository }}
|
files: |
|
||||||
TAG_NAME: ${{ github.ref_name }}
|
yoo-*
|
||||||
run: |
|
checksums.txt
|
||||||
# 创建 Release
|
token: ${{ secrets.release_token }}
|
||||||
curl -s -X POST "https://hub.gaomia.site/api/v1/repos/${GITEA_REPO}/releases" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d "{\"tag_name\":\"${TAG_NAME#refs/tags/}\",\"name\":\"${TAG_NAME#refs/tags/}\",\"body\":\"Automated release\"}"
|
|
||||||
|
|
||||||
# 上传产物
|
|
||||||
for f in yoo-* checksums.txt; do
|
|
||||||
[ -f "$f" ] && curl -s -X POST "https://hub.gaomia.site/api/v1/repos/${GITEA_REPO}/releases/upload?name=${TAG_NAME#refs/tags/}" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-F "attachment=@$f"
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user