Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b72578ecbe | |||
2ff7b6d295 |
@ -7,7 +7,6 @@ on:
|
||||
|
||||
env:
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@ -19,24 +18,22 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate Changelog
|
||||
env:
|
||||
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||
run: |
|
||||
echo "Current version: ${{ github.ref_name }}"
|
||||
wget -O /usr/bin/changelog https://gitea.com/gitea/changelog/releases/download/v1.0.0/changelog-1.0.0-linux-amd64
|
||||
chmod +x /usr/bin/changelog
|
||||
changelog -m=$TAG_NAME -c=./changelog.yaml
|
||||
changelog -m=${{ github.ref_name }} -c=./changelog.yaml
|
||||
|
||||
# 创建 Gitea Release
|
||||
- name: Create Gitea Release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||
run: |
|
||||
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"tag_name": "'"$TAG_NAME"'",
|
||||
"tag_name": "'"${{ github.ref_name }}"'",
|
||||
"target_commitish": "main",
|
||||
"name": "'"$TAG_NAME"'",
|
||||
"body": "'"waiting..."'",
|
||||
|
Loading…
x
Reference in New Issue
Block a user