✨ 移动 TAG_NAME 环境变量定义到生成变更日志和创建 Gitea Release 步骤中,以确保正确使用
This commit is contained in:
parent
e6f6a4a360
commit
d4e0541ad6
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||||
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -18,8 +18,9 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
|
env:
|
||||||
|
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||||
run: |
|
run: |
|
||||||
wget -O /usr/bin/changelog https://gitea.com/gitea/changelog/releases/download/v1.0.0/changelog-1.0.0-linux-amd64
|
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
|
chmod +x /usr/bin/changelog
|
||||||
@ -29,6 +30,7 @@ jobs:
|
|||||||
- name: Create Gitea Release
|
- name: Create Gitea Release
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||||
|
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||||
run: |
|
run: |
|
||||||
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user