Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62507822ba | |||
| b3d99bfe93 | |||
| 3db6cfcb17 | |||
| 589e4f8a06 | |||
| 748751165c |
15
.github/workflows/liteyuki-gitea-changelog.yaml
vendored
Normal file
15
.github/workflows/liteyuki-gitea-changelog.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Changelog
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- generate_changelog
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: liteyukios-latest
|
||||
steps:
|
||||
- name: "✏️ Generate release changelog"
|
||||
uses: janheinrichmerker/action-github-changelog-generator@v2.3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
50
.github/workflows/liteyuki-gitea-release.yaml
vendored
50
.github/workflows/liteyuki-gitea-release.yaml
vendored
@@ -1,21 +1,47 @@
|
||||
name: Release to Liteyuki Gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: liteyukios-latest
|
||||
|
||||
steps:
|
||||
- name: Build Changelog
|
||||
id: github_release
|
||||
uses: mikepenz/release-changelog-builder-action@v5
|
||||
# 检出代码
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 创建 Gitea Release
|
||||
- name: Create Gitea Release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||
run: |
|
||||
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||
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": "'"waiting..."'",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}'
|
||||
|
||||
|
||||
- name: Trigger Changelog Workflow
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Release
|
||||
uses: mikepenz/action-gh-release@v0.2.0-a03
|
||||
with:
|
||||
body: ${{steps.github_release.outputs.changelog}}
|
||||
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