Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62507822ba | |||
| b3d99bfe93 | |||
| 3db6cfcb17 | |||
| 589e4f8a06 |
@@ -1,8 +1,10 @@
|
||||
name: Changelog
|
||||
|
||||
on:
|
||||
release:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- created
|
||||
- generate_changelog
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: liteyukios-latest
|
||||
|
||||
21
.github/workflows/liteyuki-gitea-release.yaml
vendored
21
.github/workflows/liteyuki-gitea-release.yaml
vendored
@@ -5,6 +5,9 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: liteyukios-latest
|
||||
@@ -18,17 +21,27 @@ jobs:
|
||||
- name: Create Gitea Release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
run: |
|
||||
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||
curl -X POST "$GITEA_API_URL/repos/<owner>/<repo>/releases" \
|
||||
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"'",
|
||||
"target_commitish": "main",
|
||||
"name": "'"$TAG_NAME"'",
|
||||
"body": "'"${{ steps.changelog.outputs.changelog }}"'",
|
||||
"body": "'"waiting..."'",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}'
|
||||
}'
|
||||
|
||||
|
||||
- name: Trigger Changelog Workflow
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
$GITEA_API_URL/repos/${{ github.repository }}/dispatches \
|
||||
-d '{"event_type": "generate_changelog"}'
|
||||
Reference in New Issue
Block a user